Complete refactor to new grpc control plane and only http proxy for carts #4
@@ -54,10 +54,10 @@ COPY . .
|
|||||||
# Build with minimal binary size and embedded metadata
|
# Build with minimal binary size and embedded metadata
|
||||||
RUN --mount=type=cache,target=/go/build-cache \
|
RUN --mount=type=cache,target=/go/build-cache \
|
||||||
go build -trimpath -ldflags="-s -w \
|
go build -trimpath -ldflags="-s -w \
|
||||||
-X main.Version=${VERSION} \
|
-X main.Version=${VERSION} \
|
||||||
-X main.GitCommit=${GIT_COMMIT} \
|
-X main.GitCommit=${GIT_COMMIT} \
|
||||||
-X main.BuildDate=${BUILD_DATE}" \
|
-X main.BuildDate=${BUILD_DATE}" \
|
||||||
-o /out/go-cart-actor .
|
-o /out/go-cart-actor .
|
||||||
|
|
||||||
############################
|
############################
|
||||||
# Runtime Stage
|
# Runtime Stage
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import (
|
|||||||
|
|
||||||
messages "git.tornberg.me/go-cart-actor/pkg/messages"
|
messages "git.tornberg.me/go-cart-actor/pkg/messages"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RemoteHost mirrors the lightweight controller used for remote node
|
// RemoteHost mirrors the lightweight controller used for remote node
|
||||||
@@ -27,8 +28,8 @@ type RemoteHost struct {
|
|||||||
func NewRemoteHost(host string) (*RemoteHost, error) {
|
func NewRemoteHost(host string) (*RemoteHost, error) {
|
||||||
|
|
||||||
target := fmt.Sprintf("%s:1337", host)
|
target := fmt.Sprintf("%s:1337", host)
|
||||||
var opts []grpc.DialOption
|
|
||||||
conn, err := grpc.NewClient(target, opts...)
|
conn, err := grpc.NewClient(target, grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("AddRemote: dial %s failed: %v", target, err)
|
log.Printf("AddRemote: dial %s failed: %v", target, err)
|
||||||
|
|||||||
Reference in New Issue
Block a user