-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sink-server: added support for rest_frontend for clickhouse sinks
- Loading branch information
1 parent
8f6036b
commit dafd69e
Showing
7 changed files
with
53 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,3 +58,5 @@ sink: | |
enabled: false | ||
pgweb_frontend: | ||
enabled: false | ||
rest_frontend: | ||
enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,3 +58,5 @@ sink: | |
enabled: false | ||
pgweb_frontend: | ||
enabled: false | ||
rest_frontend: | ||
enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package docker | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/docker/cli/cli/compose/types" | ||
) | ||
|
||
func (e *DockerEngine) newRestFrontend(deploymentID string, dbService string) (conf types.ServiceConfig, motd string) { | ||
|
||
name := fmt.Sprintf("%s-rest", deploymentID) | ||
localPort := uint32(3000) // TODO: assign dynamically | ||
|
||
conf = types.ServiceConfig{ | ||
Name: name, | ||
ContainerName: name, | ||
Image: "docker.io/dfuse/sql-wrapper:latest", | ||
Restart: "on-failure", | ||
Ports: []types.ServicePortConfig{ | ||
{ | ||
Published: localPort, | ||
Target: 3000, | ||
}, | ||
}, | ||
Links: []string{dbService + ":clickhouse"}, | ||
DependsOn: []string{dbService}, | ||
Environment: map[string]*string{ | ||
"CLICKHOUSE_URL": deref("tcp://dev-node:insecure-change-me-in-prod@clickhouse:9000/substreams?secure=false&skip_verify=true&connection_timeout=20s"), | ||
}, | ||
} | ||
|
||
motd = fmt.Sprintf("REST frontend service %q available at URL: 'http://localhost:%d'", | ||
name, | ||
localPort, | ||
) | ||
|
||
return conf, motd | ||
|
||
} |