From 15956ca0bb6921590a5b818051b5b0d3f2d21b25 Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Thu, 5 Oct 2023 19:07:17 +1100 Subject: [PATCH] chore: upgrade Connect to 1.11.1 (#445) This is part of some yak shaving needed for OTEL. --- .../v1/v1connect/metrics_service.connect.go | 36 +- backend/common/download/download.go | 2 +- backend/common/plugin/serve.go | 4 +- backend/common/plugin/spawn.go | 2 +- backend/common/rpc/context.go | 4 +- backend/common/rpc/rpc.go | 2 +- backend/common/rpc/server.go | 4 +- backend/controller/console.go | 2 +- backend/controller/controller.go | 2 +- backend/runner/runner.go | 2 +- ....pkg => .protoc-gen-connect-go-1.11.1.pkg} | 0 bin/protoc-gen-connect-go | 2 +- cmd/ftl-go/main.go | 2 +- cmd/ftl/cmd_call.go | 2 +- cmd/ftl/cmd_deploy.go | 2 +- cmd/ftl/cmd_kill.go | 2 +- cmd/ftl/cmd_ps.go | 2 +- cmd/ftl/cmd_schema.go | 2 +- cmd/ftl/cmd_status.go | 2 +- cmd/ftl/cmd_update.go | 2 +- cmd/ftl/main.go | 2 +- examples/go.mod | 8 +- examples/go.sum | 20 +- examples/online-boutique/go.mod | 8 +- examples/online-boutique/go.sum | 20 +- go-runtime/sdk/call.go | 2 +- go-runtime/server/server.go | 2 +- go.mod | 8 +- go.sum | 20 +- .../pbconsoleconnect/console.connect.go | 104 ++-- .../block/ftl/v1/ftlv1connect/ftl.connect.go | 464 ++++++++++-------- 31 files changed, 403 insertions(+), 333 deletions(-) rename bin/{.protoc-gen-connect-go-1.8.0.pkg => .protoc-gen-connect-go-1.11.1.pkg} (100%) diff --git a/backend/common/3rdparty/protos/opentelemetry/proto/collector/metrics/v1/v1connect/metrics_service.connect.go b/backend/common/3rdparty/protos/opentelemetry/proto/collector/metrics/v1/v1connect/metrics_service.connect.go index 0387d602e6..3d27c156c3 100644 --- a/backend/common/3rdparty/protos/opentelemetry/proto/collector/metrics/v1/v1connect/metrics_service.connect.go +++ b/backend/common/3rdparty/protos/opentelemetry/proto/collector/metrics/v1/v1connect/metrics_service.connect.go @@ -19,9 +19,9 @@ package v1connect import ( + connect "connectrpc.com/connect" context "context" errors "errors" - connect_go "github.com/bufbuild/connect-go" v1 "go.opentelemetry.io/proto/otlp/collector/metrics/v1" http "net/http" strings "strings" @@ -32,7 +32,7 @@ import ( // generated with a version of connect newer than the one compiled into your binary. You can fix the // problem by either regenerating this code with an older version of connect or updating the connect // version compiled into your binary. -const _ = connect_go.IsAtLeastVersion0_1_0 +const _ = connect.IsAtLeastVersion0_1_0 const ( // MetricsServiceName is the fully-qualified name of the MetricsService service. @@ -56,7 +56,7 @@ const ( type MetricsServiceClient interface { // For performance reasons, it is recommended to keep this RPC // alive for the entire life of the application. - Export(context.Context, *connect_go.Request[v1.ExportMetricsServiceRequest]) (*connect_go.Response[v1.ExportMetricsServiceResponse], error) + Export(context.Context, *connect.Request[v1.ExportMetricsServiceRequest]) (*connect.Response[v1.ExportMetricsServiceResponse], error) } // NewMetricsServiceClient constructs a client for the @@ -67,10 +67,10 @@ type MetricsServiceClient interface { // // The URL supplied here should be the base URL for the Connect or gRPC server (for example, // http://api.acme.com or https://acme.com/grpc). -func NewMetricsServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) MetricsServiceClient { +func NewMetricsServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) MetricsServiceClient { baseURL = strings.TrimRight(baseURL, "/") return &metricsServiceClient{ - export: connect_go.NewClient[v1.ExportMetricsServiceRequest, v1.ExportMetricsServiceResponse]( + export: connect.NewClient[v1.ExportMetricsServiceRequest, v1.ExportMetricsServiceResponse]( httpClient, baseURL+MetricsServiceExportProcedure, opts..., @@ -80,11 +80,11 @@ func NewMetricsServiceClient(httpClient connect_go.HTTPClient, baseURL string, o // metricsServiceClient implements MetricsServiceClient. type metricsServiceClient struct { - export *connect_go.Client[v1.ExportMetricsServiceRequest, v1.ExportMetricsServiceResponse] + export *connect.Client[v1.ExportMetricsServiceRequest, v1.ExportMetricsServiceResponse] } // Export calls opentelemetry.proto.collector.metrics.v1.MetricsService.Export. -func (c *metricsServiceClient) Export(ctx context.Context, req *connect_go.Request[v1.ExportMetricsServiceRequest]) (*connect_go.Response[v1.ExportMetricsServiceResponse], error) { +func (c *metricsServiceClient) Export(ctx context.Context, req *connect.Request[v1.ExportMetricsServiceRequest]) (*connect.Response[v1.ExportMetricsServiceResponse], error) { return c.export.CallUnary(ctx, req) } @@ -93,7 +93,7 @@ func (c *metricsServiceClient) Export(ctx context.Context, req *connect_go.Reque type MetricsServiceHandler interface { // For performance reasons, it is recommended to keep this RPC // alive for the entire life of the application. - Export(context.Context, *connect_go.Request[v1.ExportMetricsServiceRequest]) (*connect_go.Response[v1.ExportMetricsServiceResponse], error) + Export(context.Context, *connect.Request[v1.ExportMetricsServiceRequest]) (*connect.Response[v1.ExportMetricsServiceResponse], error) } // NewMetricsServiceHandler builds an HTTP handler from the service implementation. It returns the @@ -101,19 +101,25 @@ type MetricsServiceHandler interface { // // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf // and JSON codecs. They also support gzip compression. -func NewMetricsServiceHandler(svc MetricsServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) { - mux := http.NewServeMux() - mux.Handle(MetricsServiceExportProcedure, connect_go.NewUnaryHandler( +func NewMetricsServiceHandler(svc MetricsServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + metricsServiceExportHandler := connect.NewUnaryHandler( MetricsServiceExportProcedure, svc.Export, opts..., - )) - return "/opentelemetry.proto.collector.metrics.v1.MetricsService/", mux + ) + return "/opentelemetry.proto.collector.metrics.v1.MetricsService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case MetricsServiceExportProcedure: + metricsServiceExportHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) } // UnimplementedMetricsServiceHandler returns CodeUnimplemented from all methods. type UnimplementedMetricsServiceHandler struct{} -func (UnimplementedMetricsServiceHandler) Export(context.Context, *connect_go.Request[v1.ExportMetricsServiceRequest]) (*connect_go.Response[v1.ExportMetricsServiceResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("opentelemetry.proto.collector.metrics.v1.MetricsService.Export is not implemented")) +func (UnimplementedMetricsServiceHandler) Export(context.Context, *connect.Request[v1.ExportMetricsServiceRequest]) (*connect.Response[v1.ExportMetricsServiceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("opentelemetry.proto.collector.metrics.v1.MetricsService.Export is not implemented")) } diff --git a/backend/common/download/download.go b/backend/common/download/download.go index f3a1824d34..b8edd6e58d 100644 --- a/backend/common/download/download.go +++ b/backend/common/download/download.go @@ -5,8 +5,8 @@ import ( "os" "path/filepath" + "connectrpc.com/connect" "github.com/alecthomas/errors" - "github.com/bufbuild/connect-go" "github.com/TBD54566975/ftl/backend/common/log" "github.com/TBD54566975/ftl/backend/common/model" diff --git a/backend/common/plugin/serve.go b/backend/common/plugin/serve.go index 5309570b73..ecddb2f546 100644 --- a/backend/common/plugin/serve.go +++ b/backend/common/plugin/serve.go @@ -13,10 +13,10 @@ import ( "syscall" "time" + "connectrpc.com/connect" + "connectrpc.com/grpcreflect" "github.com/alecthomas/errors" "github.com/alecthomas/kong" - "github.com/bufbuild/connect-go" - grpcreflect "github.com/bufbuild/connect-grpcreflect-go" "golang.org/x/net/http2" "golang.org/x/net/http2/h2c" diff --git a/backend/common/plugin/spawn.go b/backend/common/plugin/spawn.go index c68ce17014..7c16d4870d 100644 --- a/backend/common/plugin/spawn.go +++ b/backend/common/plugin/spawn.go @@ -10,8 +10,8 @@ import ( "syscall" "time" + "connectrpc.com/connect" "github.com/alecthomas/errors" - "github.com/bufbuild/connect-go" "github.com/jpillora/backoff" "github.com/TBD54566975/ftl/backend/common/exec" diff --git a/backend/common/rpc/context.go b/backend/common/rpc/context.go index 94b438df0e..93c8774da8 100644 --- a/backend/common/rpc/context.go +++ b/backend/common/rpc/context.go @@ -4,9 +4,9 @@ import ( "context" "net/http" + "connectrpc.com/connect" + "connectrpc.com/otelconnect" "github.com/alecthomas/errors" - "github.com/bufbuild/connect-go" - otelconnect "github.com/bufbuild/connect-opentelemetry-go" "github.com/TBD54566975/ftl/backend/common/log" "github.com/TBD54566975/ftl/backend/common/model" diff --git a/backend/common/rpc/rpc.go b/backend/common/rpc/rpc.go index f3d304518e..81c01ec6ec 100644 --- a/backend/common/rpc/rpc.go +++ b/backend/common/rpc/rpc.go @@ -8,8 +8,8 @@ import ( "strings" "time" + "connectrpc.com/connect" "github.com/alecthomas/errors" - "github.com/bufbuild/connect-go" "github.com/jpillora/backoff" "golang.org/x/net/http2" diff --git a/backend/common/rpc/server.go b/backend/common/rpc/server.go index 20b4c5f0a7..339643a206 100644 --- a/backend/common/rpc/server.go +++ b/backend/common/rpc/server.go @@ -8,10 +8,10 @@ import ( "strings" "time" + "connectrpc.com/connect" + "connectrpc.com/grpcreflect" "github.com/alecthomas/concurrency" "github.com/alecthomas/errors" - "github.com/bufbuild/connect-go" - grpcreflect "github.com/bufbuild/connect-grpcreflect-go" "github.com/rs/cors" "golang.org/x/net/http2" "golang.org/x/net/http2/h2c" diff --git a/backend/controller/console.go b/backend/controller/console.go index 554117c3a7..791c69c963 100644 --- a/backend/controller/console.go +++ b/backend/controller/console.go @@ -5,9 +5,9 @@ import ( "encoding/json" "time" + "connectrpc.com/connect" "github.com/alecthomas/errors" "github.com/alecthomas/types" - "github.com/bufbuild/connect-go" "google.golang.org/protobuf/types/known/durationpb" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/backend/controller/controller.go b/backend/controller/controller.go index 0ddff7296d..c20045ed90 100644 --- a/backend/controller/controller.go +++ b/backend/controller/controller.go @@ -14,11 +14,11 @@ import ( "sync" "time" + "connectrpc.com/connect" "github.com/alecthomas/concurrency" "github.com/alecthomas/errors" "github.com/alecthomas/kong" "github.com/alecthomas/types" - "github.com/bufbuild/connect-go" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgxpool" "github.com/jellydator/ttlcache/v3" diff --git a/backend/runner/runner.go b/backend/runner/runner.go index b2e09e14ce..ad788b3d8c 100644 --- a/backend/runner/runner.go +++ b/backend/runner/runner.go @@ -13,10 +13,10 @@ import ( "syscall" "time" + "connectrpc.com/connect" "github.com/alecthomas/atomic" "github.com/alecthomas/errors" "github.com/alecthomas/types" - "github.com/bufbuild/connect-go" "github.com/jpillora/backoff" "github.com/otiai10/copy" "google.golang.org/protobuf/types/known/structpb" diff --git a/bin/.protoc-gen-connect-go-1.8.0.pkg b/bin/.protoc-gen-connect-go-1.11.1.pkg similarity index 100% rename from bin/.protoc-gen-connect-go-1.8.0.pkg rename to bin/.protoc-gen-connect-go-1.11.1.pkg diff --git a/bin/protoc-gen-connect-go b/bin/protoc-gen-connect-go index 829c593cba..b8231055b2 120000 --- a/bin/protoc-gen-connect-go +++ b/bin/protoc-gen-connect-go @@ -1 +1 @@ -.protoc-gen-connect-go-1.8.0.pkg \ No newline at end of file +.protoc-gen-connect-go-1.11.1.pkg \ No newline at end of file diff --git a/cmd/ftl-go/main.go b/cmd/ftl-go/main.go index 34d91a225c..df92c5ee72 100644 --- a/cmd/ftl-go/main.go +++ b/cmd/ftl-go/main.go @@ -11,9 +11,9 @@ import ( "strings" "time" + "connectrpc.com/connect" "github.com/alecthomas/errors" "github.com/alecthomas/kong" - "github.com/bufbuild/connect-go" "github.com/radovskyb/watcher" "golang.org/x/mod/modfile" "golang.org/x/sync/errgroup" diff --git a/cmd/ftl/cmd_call.go b/cmd/ftl/cmd_call.go index 1ebd6a719a..379f7b4376 100644 --- a/cmd/ftl/cmd_call.go +++ b/cmd/ftl/cmd_call.go @@ -5,8 +5,8 @@ import ( "encoding/json" "fmt" + "connectrpc.com/connect" "github.com/alecthomas/errors" - "github.com/bufbuild/connect-go" "github.com/titanous/json5" "github.com/TBD54566975/ftl/go-runtime/sdk" diff --git a/cmd/ftl/cmd_deploy.go b/cmd/ftl/cmd_deploy.go index 90f1833f8a..5510de532b 100644 --- a/cmd/ftl/cmd_deploy.go +++ b/cmd/ftl/cmd_deploy.go @@ -6,8 +6,8 @@ import ( "path/filepath" "strings" + "connectrpc.com/connect" "github.com/alecthomas/errors" - "github.com/bufbuild/connect-go" "golang.org/x/exp/maps" "google.golang.org/protobuf/types/known/timestamppb" diff --git a/cmd/ftl/cmd_kill.go b/cmd/ftl/cmd_kill.go index 8b5ee57718..3d8a1c7ef8 100644 --- a/cmd/ftl/cmd_kill.go +++ b/cmd/ftl/cmd_kill.go @@ -3,8 +3,8 @@ package main import ( "context" + "connectrpc.com/connect" "github.com/alecthomas/errors" - "github.com/bufbuild/connect-go" "github.com/TBD54566975/ftl/backend/common/model" ftlv1 "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1" diff --git a/cmd/ftl/cmd_ps.go b/cmd/ftl/cmd_ps.go index 21bb50beec..3dff52ea79 100644 --- a/cmd/ftl/cmd_ps.go +++ b/cmd/ftl/cmd_ps.go @@ -7,8 +7,8 @@ import ( "sort" "strings" + "connectrpc.com/connect" "github.com/alecthomas/errors" - "github.com/bufbuild/connect-go" "github.com/golang/protobuf/jsonpb" "golang.org/x/exp/maps" diff --git a/cmd/ftl/cmd_schema.go b/cmd/ftl/cmd_schema.go index 8663902de3..5de91be0b2 100644 --- a/cmd/ftl/cmd_schema.go +++ b/cmd/ftl/cmd_schema.go @@ -4,8 +4,8 @@ import ( "context" "fmt" + "connectrpc.com/connect" "github.com/alecthomas/errors" - "github.com/bufbuild/connect-go" "github.com/TBD54566975/ftl/backend/schema" ftlv1 "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1" diff --git a/cmd/ftl/cmd_status.go b/cmd/ftl/cmd_status.go index cfef9613b6..c8ce8094f6 100644 --- a/cmd/ftl/cmd_status.go +++ b/cmd/ftl/cmd_status.go @@ -4,8 +4,8 @@ import ( "context" "os" + "connectrpc.com/connect" "github.com/alecthomas/errors" - "github.com/bufbuild/connect-go" "github.com/golang/protobuf/jsonpb" ftlv1 "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1" diff --git a/cmd/ftl/cmd_update.go b/cmd/ftl/cmd_update.go index e24fc3cb56..1b26436073 100644 --- a/cmd/ftl/cmd_update.go +++ b/cmd/ftl/cmd_update.go @@ -3,8 +3,8 @@ package main import ( "context" + "connectrpc.com/connect" "github.com/alecthomas/errors" - "github.com/bufbuild/connect-go" "github.com/TBD54566975/ftl/backend/common/model" ftlv1 "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1" diff --git a/cmd/ftl/main.go b/cmd/ftl/main.go index f9b4824419..405acffc6b 100644 --- a/cmd/ftl/main.go +++ b/cmd/ftl/main.go @@ -8,9 +8,9 @@ import ( "runtime" "syscall" + "connectrpc.com/connect" "github.com/alecthomas/kong" kongtoml "github.com/alecthomas/kong-toml" - "github.com/bufbuild/connect-go" _ "github.com/TBD54566975/ftl/backend/common/automaxprocs" // Set GOMAXPROCS to match Linux container CPU quota. "github.com/TBD54566975/ftl/backend/common/log" diff --git a/examples/go.mod b/examples/go.mod index ec45039619..edc955c3ec 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -7,14 +7,14 @@ replace github.com/TBD54566975/ftl => ../ require github.com/TBD54566975/ftl v0.0.0-00010101000000-000000000000 require ( + connectrpc.com/connect v1.11.1 // indirect + connectrpc.com/grpcreflect v1.2.0 // indirect + connectrpc.com/otelconnect v0.5.0 // indirect github.com/alecthomas/concurrency v0.0.2 // indirect github.com/alecthomas/errors v0.4.0 // indirect github.com/alecthomas/participle/v2 v2.0.0 // indirect github.com/alecthomas/types v0.7.1 // indirect github.com/alessio/shellescape v1.4.1 // indirect - github.com/bufbuild/connect-go v1.8.0 // indirect - github.com/bufbuild/connect-grpcreflect-go v1.1.0 // indirect - github.com/bufbuild/connect-opentelemetry-go v0.3.0 // indirect github.com/danieljoos/wincred v1.1.0 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -37,5 +37,5 @@ require ( golang.org/x/sync v0.3.0 // indirect golang.org/x/sys v0.11.0 // indirect golang.org/x/text v0.12.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect ) diff --git a/examples/go.sum b/examples/go.sum index 7465084921..05fa9c9247 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -1,3 +1,9 @@ +connectrpc.com/connect v1.11.1 h1:dqRwblixqkVh+OFBOOL1yIf1jS/yP0MSJLijRj29bFg= +connectrpc.com/connect v1.11.1/go.mod h1:3AGaO6RRGMx5IKFfqbe3hvK1NqLosFNP2BxDYTPmNPo= +connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U= +connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY= +connectrpc.com/otelconnect v0.5.0 h1:K7xQKFbgeaHx563B+IIbd1EJe856AanueIYtGEtdnH8= +connectrpc.com/otelconnect v0.5.0/go.mod h1:cjBMmtJmTokg4/k/3iDjLOjfNVM4qSVfIWz/qWQ8FNw= github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= github.com/alecthomas/concurrency v0.0.2 h1:Q3kGPtLbleMbH9lHX5OBFvJygfyFw29bXZKBg+IEVuo= @@ -16,12 +22,6 @@ github.com/bool64/dev v0.2.29 h1:x+syGyh+0eWtOzQ1ItvLzOGIWyNWnyjXpHIcpF2HvL4= github.com/bool64/dev v0.2.29/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg= github.com/bool64/shared v0.1.5 h1:fp3eUhBsrSjNCQPcSdQqZxxh9bBwrYiZ+zOKFkM0/2E= github.com/bool64/shared v0.1.5/go.mod h1:081yz68YC9jeFB3+Bbmno2RFWvGKv1lPKkMP6MHJlPs= -github.com/bufbuild/connect-go v1.8.0 h1:srluNkFkZBfSfg9Qb6DrO+5nMaxix//h2ctrHZhMGKc= -github.com/bufbuild/connect-go v1.8.0/go.mod h1:GmMJYR6orFqD0Y6ZgX8pwQ8j9baizDrIQMm1/a6LnHk= -github.com/bufbuild/connect-grpcreflect-go v1.1.0 h1:T0FKu1y9zZW4cjHuF+Q7jIN6ek8HTpCxOP8ZsORZICg= -github.com/bufbuild/connect-grpcreflect-go v1.1.0/go.mod h1:AxcY2fSAr+oQQuu+K35qy2VDtX+LWr7SrS2SvfjY898= -github.com/bufbuild/connect-opentelemetry-go v0.3.0 h1:AuZi3asTDKmjGtd2aqpyP4p5QvBFG/YEaHopViLatnk= -github.com/bufbuild/connect-opentelemetry-go v0.3.0/go.mod h1:r1ppyTtu1EWeRodk4Q/JbyQhIWtO7eR3GoRDzjeEcNU= github.com/danieljoos/wincred v1.1.0 h1:3RNcEpBg4IhIChZdFRSdlQt1QjCp1sMAPIrOnm7Yf8g= github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -69,8 +69,8 @@ github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NF github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/swaggest/assertjson v1.9.0 h1:dKu0BfJkIxv/xe//mkCrK5yZbs79jL7OVf9Ija7o2xQ= github.com/swaggest/assertjson v1.9.0/go.mod h1:b+ZKX2VRiUjxfUIal0HDN85W0nHPAYUbYH5WkkSsFsU= github.com/swaggest/jsonschema-go v0.3.59 h1:BoPhtNvWbZRo1Wl6xvR3g6WL01COJTOAs6vMUnZgocM= @@ -110,8 +110,8 @@ golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 h1:Vve/L0v7CXXuxUmaMGIE golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= diff --git a/examples/online-boutique/go.mod b/examples/online-boutique/go.mod index c1b863e219..48f40985c0 100644 --- a/examples/online-boutique/go.mod +++ b/examples/online-boutique/go.mod @@ -13,13 +13,13 @@ require ( ) require ( + connectrpc.com/connect v1.11.1 // indirect + connectrpc.com/grpcreflect v1.2.0 // indirect + connectrpc.com/otelconnect v0.5.0 // indirect github.com/alecthomas/concurrency v0.0.2 // indirect github.com/alecthomas/participle/v2 v2.0.0 // indirect github.com/alecthomas/types v0.7.1 // indirect github.com/alessio/shellescape v1.4.1 // indirect - github.com/bufbuild/connect-go v1.8.0 // indirect - github.com/bufbuild/connect-grpcreflect-go v1.1.0 // indirect - github.com/bufbuild/connect-opentelemetry-go v0.3.0 // indirect github.com/danieljoos/wincred v1.1.0 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -40,5 +40,5 @@ require ( golang.org/x/sync v0.3.0 // indirect golang.org/x/sys v0.11.0 // indirect golang.org/x/text v0.12.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect ) diff --git a/examples/online-boutique/go.sum b/examples/online-boutique/go.sum index 0ad1144229..a6e3475d2c 100644 --- a/examples/online-boutique/go.sum +++ b/examples/online-boutique/go.sum @@ -1,3 +1,9 @@ +connectrpc.com/connect v1.11.1 h1:dqRwblixqkVh+OFBOOL1yIf1jS/yP0MSJLijRj29bFg= +connectrpc.com/connect v1.11.1/go.mod h1:3AGaO6RRGMx5IKFfqbe3hvK1NqLosFNP2BxDYTPmNPo= +connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U= +connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY= +connectrpc.com/otelconnect v0.5.0 h1:K7xQKFbgeaHx563B+IIbd1EJe856AanueIYtGEtdnH8= +connectrpc.com/otelconnect v0.5.0/go.mod h1:cjBMmtJmTokg4/k/3iDjLOjfNVM4qSVfIWz/qWQ8FNw= github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= github.com/alecthomas/concurrency v0.0.2 h1:Q3kGPtLbleMbH9lHX5OBFvJygfyFw29bXZKBg+IEVuo= @@ -16,12 +22,6 @@ github.com/bool64/dev v0.2.29 h1:x+syGyh+0eWtOzQ1ItvLzOGIWyNWnyjXpHIcpF2HvL4= github.com/bool64/dev v0.2.29/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg= github.com/bool64/shared v0.1.5 h1:fp3eUhBsrSjNCQPcSdQqZxxh9bBwrYiZ+zOKFkM0/2E= github.com/bool64/shared v0.1.5/go.mod h1:081yz68YC9jeFB3+Bbmno2RFWvGKv1lPKkMP6MHJlPs= -github.com/bufbuild/connect-go v1.8.0 h1:srluNkFkZBfSfg9Qb6DrO+5nMaxix//h2ctrHZhMGKc= -github.com/bufbuild/connect-go v1.8.0/go.mod h1:GmMJYR6orFqD0Y6ZgX8pwQ8j9baizDrIQMm1/a6LnHk= -github.com/bufbuild/connect-grpcreflect-go v1.1.0 h1:T0FKu1y9zZW4cjHuF+Q7jIN6ek8HTpCxOP8ZsORZICg= -github.com/bufbuild/connect-grpcreflect-go v1.1.0/go.mod h1:AxcY2fSAr+oQQuu+K35qy2VDtX+LWr7SrS2SvfjY898= -github.com/bufbuild/connect-opentelemetry-go v0.3.0 h1:AuZi3asTDKmjGtd2aqpyP4p5QvBFG/YEaHopViLatnk= -github.com/bufbuild/connect-opentelemetry-go v0.3.0/go.mod h1:r1ppyTtu1EWeRodk4Q/JbyQhIWtO7eR3GoRDzjeEcNU= github.com/danieljoos/wincred v1.1.0 h1:3RNcEpBg4IhIChZdFRSdlQt1QjCp1sMAPIrOnm7Yf8g= github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -71,8 +71,8 @@ github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NF github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/swaggest/assertjson v1.9.0 h1:dKu0BfJkIxv/xe//mkCrK5yZbs79jL7OVf9Ija7o2xQ= github.com/swaggest/assertjson v1.9.0/go.mod h1:b+ZKX2VRiUjxfUIal0HDN85W0nHPAYUbYH5WkkSsFsU= github.com/swaggest/jsonschema-go v0.3.59 h1:BoPhtNvWbZRo1Wl6xvR3g6WL01COJTOAs6vMUnZgocM= @@ -112,8 +112,8 @@ golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 h1:Vve/L0v7CXXuxUmaMGIE golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= diff --git a/go-runtime/sdk/call.go b/go-runtime/sdk/call.go index cc67493043..f2a6f3f98a 100644 --- a/go-runtime/sdk/call.go +++ b/go-runtime/sdk/call.go @@ -8,8 +8,8 @@ import ( "runtime" "strings" + "connectrpc.com/connect" "github.com/alecthomas/errors" - "github.com/bufbuild/connect-go" "github.com/iancoleman/strcase" "github.com/TBD54566975/ftl/backend/common/rpc" diff --git a/go-runtime/server/server.go b/go-runtime/server/server.go index bbbf3aaf77..5492cd2483 100644 --- a/go-runtime/server/server.go +++ b/go-runtime/server/server.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/url" + "connectrpc.com/connect" "github.com/alecthomas/errors" - "github.com/bufbuild/connect-go" "github.com/TBD54566975/ftl/backend/common/log" "github.com/TBD54566975/ftl/backend/common/maps" diff --git a/go.mod b/go.mod index a717bff18d..5058439467 100644 --- a/go.mod +++ b/go.mod @@ -3,10 +3,10 @@ module github.com/TBD54566975/ftl go 1.21 require ( + connectrpc.com/connect v1.11.1 github.com/BurntSushi/toml v1.3.2 github.com/alecthomas/kong v0.8.0 github.com/alecthomas/kong-toml v0.0.0-20230922031405-31cfb1264a3b - github.com/bufbuild/connect-go v1.8.0 github.com/go-logr/logr v1.2.4 github.com/golang/protobuf v1.5.3 github.com/google/uuid v1.3.0 @@ -27,7 +27,7 @@ require ( golang.org/x/net v0.14.0 golang.org/x/sync v0.3.0 golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 - google.golang.org/protobuf v1.30.0 + google.golang.org/protobuf v1.31.0 ) require ( @@ -56,14 +56,14 @@ require ( ) require ( + connectrpc.com/grpcreflect v1.2.0 + connectrpc.com/otelconnect v0.5.0 github.com/alecthomas/assert/v2 v2.3.0 github.com/alecthomas/atomic v0.1.0-alpha2 github.com/alecthomas/concurrency v0.0.2 github.com/alecthomas/errors v0.4.0 github.com/alecthomas/participle/v2 v2.0.0 github.com/alecthomas/types v0.7.1 - github.com/bufbuild/connect-grpcreflect-go v1.1.0 - github.com/bufbuild/connect-opentelemetry-go v0.3.0 github.com/deckarep/golang-set/v2 v2.3.0 github.com/gofrs/flock v0.8.1 github.com/iancoleman/strcase v0.2.0 diff --git a/go.sum b/go.sum index 8e36dd15b2..c061b17fd6 100644 --- a/go.sum +++ b/go.sum @@ -30,6 +30,12 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +connectrpc.com/connect v1.11.1 h1:dqRwblixqkVh+OFBOOL1yIf1jS/yP0MSJLijRj29bFg= +connectrpc.com/connect v1.11.1/go.mod h1:3AGaO6RRGMx5IKFfqbe3hvK1NqLosFNP2BxDYTPmNPo= +connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U= +connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY= +connectrpc.com/otelconnect v0.5.0 h1:K7xQKFbgeaHx563B+IIbd1EJe856AanueIYtGEtdnH8= +connectrpc.com/otelconnect v0.5.0/go.mod h1:cjBMmtJmTokg4/k/3iDjLOjfNVM4qSVfIWz/qWQ8FNw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= @@ -61,12 +67,6 @@ github.com/bool64/dev v0.2.29 h1:x+syGyh+0eWtOzQ1ItvLzOGIWyNWnyjXpHIcpF2HvL4= github.com/bool64/dev v0.2.29/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg= github.com/bool64/shared v0.1.5 h1:fp3eUhBsrSjNCQPcSdQqZxxh9bBwrYiZ+zOKFkM0/2E= github.com/bool64/shared v0.1.5/go.mod h1:081yz68YC9jeFB3+Bbmno2RFWvGKv1lPKkMP6MHJlPs= -github.com/bufbuild/connect-go v1.8.0 h1:srluNkFkZBfSfg9Qb6DrO+5nMaxix//h2ctrHZhMGKc= -github.com/bufbuild/connect-go v1.8.0/go.mod h1:GmMJYR6orFqD0Y6ZgX8pwQ8j9baizDrIQMm1/a6LnHk= -github.com/bufbuild/connect-grpcreflect-go v1.1.0 h1:T0FKu1y9zZW4cjHuF+Q7jIN6ek8HTpCxOP8ZsORZICg= -github.com/bufbuild/connect-grpcreflect-go v1.1.0/go.mod h1:AxcY2fSAr+oQQuu+K35qy2VDtX+LWr7SrS2SvfjY898= -github.com/bufbuild/connect-opentelemetry-go v0.3.0 h1:AuZi3asTDKmjGtd2aqpyP4p5QvBFG/YEaHopViLatnk= -github.com/bufbuild/connect-opentelemetry-go v0.3.0/go.mod h1:r1ppyTtu1EWeRodk4Q/JbyQhIWtO7eR3GoRDzjeEcNU= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -250,8 +250,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/swaggest/assertjson v1.9.0 h1:dKu0BfJkIxv/xe//mkCrK5yZbs79jL7OVf9Ija7o2xQ= github.com/swaggest/assertjson v1.9.0/go.mod h1:b+ZKX2VRiUjxfUIal0HDN85W0nHPAYUbYH5WkkSsFsU= github.com/swaggest/jsonschema-go v0.3.59 h1:BoPhtNvWbZRo1Wl6xvR3g6WL01COJTOAs6vMUnZgocM= @@ -558,8 +558,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/protos/xyz/block/ftl/v1/console/pbconsoleconnect/console.connect.go b/protos/xyz/block/ftl/v1/console/pbconsoleconnect/console.connect.go index 5e2a82f831..61590ac900 100644 --- a/protos/xyz/block/ftl/v1/console/pbconsoleconnect/console.connect.go +++ b/protos/xyz/block/ftl/v1/console/pbconsoleconnect/console.connect.go @@ -5,11 +5,11 @@ package pbconsoleconnect import ( + connect "connectrpc.com/connect" context "context" errors "errors" v1 "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1" console "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1/console" - connect_go "github.com/bufbuild/connect-go" http "net/http" strings "strings" ) @@ -19,7 +19,7 @@ import ( // generated with a version of connect newer than the one compiled into your binary. You can fix the // problem by either regenerating this code with an older version of connect or updating the connect // version compiled into your binary. -const _ = connect_go.IsAtLeastVersion1_7_0 +const _ = connect.IsAtLeastVersion1_7_0 const ( // ConsoleServiceName is the fully-qualified name of the ConsoleService service. @@ -50,10 +50,10 @@ const ( // ConsoleServiceClient is a client for the xyz.block.ftl.v1.console.ConsoleService service. type ConsoleServiceClient interface { // Ping service for readiness. - Ping(context.Context, *connect_go.Request[v1.PingRequest]) (*connect_go.Response[v1.PingResponse], error) - GetModules(context.Context, *connect_go.Request[console.GetModulesRequest]) (*connect_go.Response[console.GetModulesResponse], error) - StreamEvents(context.Context, *connect_go.Request[console.StreamEventsRequest]) (*connect_go.ServerStreamForClient[console.StreamEventsResponse], error) - GetEvents(context.Context, *connect_go.Request[console.EventsQuery]) (*connect_go.Response[console.GetEventsResponse], error) + Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) + GetModules(context.Context, *connect.Request[console.GetModulesRequest]) (*connect.Response[console.GetModulesResponse], error) + StreamEvents(context.Context, *connect.Request[console.StreamEventsRequest]) (*connect.ServerStreamForClient[console.StreamEventsResponse], error) + GetEvents(context.Context, *connect.Request[console.EventsQuery]) (*connect.Response[console.GetEventsResponse], error) } // NewConsoleServiceClient constructs a client for the xyz.block.ftl.v1.console.ConsoleService @@ -63,26 +63,26 @@ type ConsoleServiceClient interface { // // The URL supplied here should be the base URL for the Connect or gRPC server (for example, // http://api.acme.com or https://acme.com/grpc). -func NewConsoleServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) ConsoleServiceClient { +func NewConsoleServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ConsoleServiceClient { baseURL = strings.TrimRight(baseURL, "/") return &consoleServiceClient{ - ping: connect_go.NewClient[v1.PingRequest, v1.PingResponse]( + ping: connect.NewClient[v1.PingRequest, v1.PingResponse]( httpClient, baseURL+ConsoleServicePingProcedure, - connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), - connect_go.WithClientOptions(opts...), + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithClientOptions(opts...), ), - getModules: connect_go.NewClient[console.GetModulesRequest, console.GetModulesResponse]( + getModules: connect.NewClient[console.GetModulesRequest, console.GetModulesResponse]( httpClient, baseURL+ConsoleServiceGetModulesProcedure, opts..., ), - streamEvents: connect_go.NewClient[console.StreamEventsRequest, console.StreamEventsResponse]( + streamEvents: connect.NewClient[console.StreamEventsRequest, console.StreamEventsResponse]( httpClient, baseURL+ConsoleServiceStreamEventsProcedure, opts..., ), - getEvents: connect_go.NewClient[console.EventsQuery, console.GetEventsResponse]( + getEvents: connect.NewClient[console.EventsQuery, console.GetEventsResponse]( httpClient, baseURL+ConsoleServiceGetEventsProcedure, opts..., @@ -92,29 +92,29 @@ func NewConsoleServiceClient(httpClient connect_go.HTTPClient, baseURL string, o // consoleServiceClient implements ConsoleServiceClient. type consoleServiceClient struct { - ping *connect_go.Client[v1.PingRequest, v1.PingResponse] - getModules *connect_go.Client[console.GetModulesRequest, console.GetModulesResponse] - streamEvents *connect_go.Client[console.StreamEventsRequest, console.StreamEventsResponse] - getEvents *connect_go.Client[console.EventsQuery, console.GetEventsResponse] + ping *connect.Client[v1.PingRequest, v1.PingResponse] + getModules *connect.Client[console.GetModulesRequest, console.GetModulesResponse] + streamEvents *connect.Client[console.StreamEventsRequest, console.StreamEventsResponse] + getEvents *connect.Client[console.EventsQuery, console.GetEventsResponse] } // Ping calls xyz.block.ftl.v1.console.ConsoleService.Ping. -func (c *consoleServiceClient) Ping(ctx context.Context, req *connect_go.Request[v1.PingRequest]) (*connect_go.Response[v1.PingResponse], error) { +func (c *consoleServiceClient) Ping(ctx context.Context, req *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { return c.ping.CallUnary(ctx, req) } // GetModules calls xyz.block.ftl.v1.console.ConsoleService.GetModules. -func (c *consoleServiceClient) GetModules(ctx context.Context, req *connect_go.Request[console.GetModulesRequest]) (*connect_go.Response[console.GetModulesResponse], error) { +func (c *consoleServiceClient) GetModules(ctx context.Context, req *connect.Request[console.GetModulesRequest]) (*connect.Response[console.GetModulesResponse], error) { return c.getModules.CallUnary(ctx, req) } // StreamEvents calls xyz.block.ftl.v1.console.ConsoleService.StreamEvents. -func (c *consoleServiceClient) StreamEvents(ctx context.Context, req *connect_go.Request[console.StreamEventsRequest]) (*connect_go.ServerStreamForClient[console.StreamEventsResponse], error) { +func (c *consoleServiceClient) StreamEvents(ctx context.Context, req *connect.Request[console.StreamEventsRequest]) (*connect.ServerStreamForClient[console.StreamEventsResponse], error) { return c.streamEvents.CallServerStream(ctx, req) } // GetEvents calls xyz.block.ftl.v1.console.ConsoleService.GetEvents. -func (c *consoleServiceClient) GetEvents(ctx context.Context, req *connect_go.Request[console.EventsQuery]) (*connect_go.Response[console.GetEventsResponse], error) { +func (c *consoleServiceClient) GetEvents(ctx context.Context, req *connect.Request[console.EventsQuery]) (*connect.Response[console.GetEventsResponse], error) { return c.getEvents.CallUnary(ctx, req) } @@ -122,10 +122,10 @@ func (c *consoleServiceClient) GetEvents(ctx context.Context, req *connect_go.Re // service. type ConsoleServiceHandler interface { // Ping service for readiness. - Ping(context.Context, *connect_go.Request[v1.PingRequest]) (*connect_go.Response[v1.PingResponse], error) - GetModules(context.Context, *connect_go.Request[console.GetModulesRequest]) (*connect_go.Response[console.GetModulesResponse], error) - StreamEvents(context.Context, *connect_go.Request[console.StreamEventsRequest], *connect_go.ServerStream[console.StreamEventsResponse]) error - GetEvents(context.Context, *connect_go.Request[console.EventsQuery]) (*connect_go.Response[console.GetEventsResponse], error) + Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) + GetModules(context.Context, *connect.Request[console.GetModulesRequest]) (*connect.Response[console.GetModulesResponse], error) + StreamEvents(context.Context, *connect.Request[console.StreamEventsRequest], *connect.ServerStream[console.StreamEventsResponse]) error + GetEvents(context.Context, *connect.Request[console.EventsQuery]) (*connect.Response[console.GetEventsResponse], error) } // NewConsoleServiceHandler builds an HTTP handler from the service implementation. It returns the @@ -133,47 +133,59 @@ type ConsoleServiceHandler interface { // // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf // and JSON codecs. They also support gzip compression. -func NewConsoleServiceHandler(svc ConsoleServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) { - mux := http.NewServeMux() - mux.Handle(ConsoleServicePingProcedure, connect_go.NewUnaryHandler( +func NewConsoleServiceHandler(svc ConsoleServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + consoleServicePingHandler := connect.NewUnaryHandler( ConsoleServicePingProcedure, svc.Ping, - connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), - connect_go.WithHandlerOptions(opts...), - )) - mux.Handle(ConsoleServiceGetModulesProcedure, connect_go.NewUnaryHandler( + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithHandlerOptions(opts...), + ) + consoleServiceGetModulesHandler := connect.NewUnaryHandler( ConsoleServiceGetModulesProcedure, svc.GetModules, opts..., - )) - mux.Handle(ConsoleServiceStreamEventsProcedure, connect_go.NewServerStreamHandler( + ) + consoleServiceStreamEventsHandler := connect.NewServerStreamHandler( ConsoleServiceStreamEventsProcedure, svc.StreamEvents, opts..., - )) - mux.Handle(ConsoleServiceGetEventsProcedure, connect_go.NewUnaryHandler( + ) + consoleServiceGetEventsHandler := connect.NewUnaryHandler( ConsoleServiceGetEventsProcedure, svc.GetEvents, opts..., - )) - return "/xyz.block.ftl.v1.console.ConsoleService/", mux + ) + return "/xyz.block.ftl.v1.console.ConsoleService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case ConsoleServicePingProcedure: + consoleServicePingHandler.ServeHTTP(w, r) + case ConsoleServiceGetModulesProcedure: + consoleServiceGetModulesHandler.ServeHTTP(w, r) + case ConsoleServiceStreamEventsProcedure: + consoleServiceStreamEventsHandler.ServeHTTP(w, r) + case ConsoleServiceGetEventsProcedure: + consoleServiceGetEventsHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) } // UnimplementedConsoleServiceHandler returns CodeUnimplemented from all methods. type UnimplementedConsoleServiceHandler struct{} -func (UnimplementedConsoleServiceHandler) Ping(context.Context, *connect_go.Request[v1.PingRequest]) (*connect_go.Response[v1.PingResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.console.ConsoleService.Ping is not implemented")) +func (UnimplementedConsoleServiceHandler) Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.console.ConsoleService.Ping is not implemented")) } -func (UnimplementedConsoleServiceHandler) GetModules(context.Context, *connect_go.Request[console.GetModulesRequest]) (*connect_go.Response[console.GetModulesResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.console.ConsoleService.GetModules is not implemented")) +func (UnimplementedConsoleServiceHandler) GetModules(context.Context, *connect.Request[console.GetModulesRequest]) (*connect.Response[console.GetModulesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.console.ConsoleService.GetModules is not implemented")) } -func (UnimplementedConsoleServiceHandler) StreamEvents(context.Context, *connect_go.Request[console.StreamEventsRequest], *connect_go.ServerStream[console.StreamEventsResponse]) error { - return connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.console.ConsoleService.StreamEvents is not implemented")) +func (UnimplementedConsoleServiceHandler) StreamEvents(context.Context, *connect.Request[console.StreamEventsRequest], *connect.ServerStream[console.StreamEventsResponse]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.console.ConsoleService.StreamEvents is not implemented")) } -func (UnimplementedConsoleServiceHandler) GetEvents(context.Context, *connect_go.Request[console.EventsQuery]) (*connect_go.Response[console.GetEventsResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.console.ConsoleService.GetEvents is not implemented")) +func (UnimplementedConsoleServiceHandler) GetEvents(context.Context, *connect.Request[console.EventsQuery]) (*connect.Response[console.GetEventsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.console.ConsoleService.GetEvents is not implemented")) } diff --git a/protos/xyz/block/ftl/v1/ftlv1connect/ftl.connect.go b/protos/xyz/block/ftl/v1/ftlv1connect/ftl.connect.go index 3c4ce53dd3..07e1300ca6 100644 --- a/protos/xyz/block/ftl/v1/ftlv1connect/ftl.connect.go +++ b/protos/xyz/block/ftl/v1/ftlv1connect/ftl.connect.go @@ -5,10 +5,10 @@ package ftlv1connect import ( + connect "connectrpc.com/connect" context "context" errors "errors" v1 "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1" - connect_go "github.com/bufbuild/connect-go" http "net/http" strings "strings" ) @@ -18,7 +18,7 @@ import ( // generated with a version of connect newer than the one compiled into your binary. You can fix the // problem by either regenerating this code with an older version of connect or updating the connect // version compiled into your binary. -const _ = connect_go.IsAtLeastVersion1_7_0 +const _ = connect.IsAtLeastVersion1_7_0 const ( // VerbServiceName is the fully-qualified name of the VerbService service. @@ -95,9 +95,9 @@ const ( // VerbServiceClient is a client for the xyz.block.ftl.v1.VerbService service. type VerbServiceClient interface { // Ping service for readiness. - Ping(context.Context, *connect_go.Request[v1.PingRequest]) (*connect_go.Response[v1.PingResponse], error) + Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) // Issue a synchronous call to a Verb. - Call(context.Context, *connect_go.Request[v1.CallRequest]) (*connect_go.Response[v1.CallResponse], error) + Call(context.Context, *connect.Request[v1.CallRequest]) (*connect.Response[v1.CallResponse], error) } // NewVerbServiceClient constructs a client for the xyz.block.ftl.v1.VerbService service. By @@ -107,16 +107,16 @@ type VerbServiceClient interface { // // The URL supplied here should be the base URL for the Connect or gRPC server (for example, // http://api.acme.com or https://acme.com/grpc). -func NewVerbServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) VerbServiceClient { +func NewVerbServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) VerbServiceClient { baseURL = strings.TrimRight(baseURL, "/") return &verbServiceClient{ - ping: connect_go.NewClient[v1.PingRequest, v1.PingResponse]( + ping: connect.NewClient[v1.PingRequest, v1.PingResponse]( httpClient, baseURL+VerbServicePingProcedure, - connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), - connect_go.WithClientOptions(opts...), + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithClientOptions(opts...), ), - call: connect_go.NewClient[v1.CallRequest, v1.CallResponse]( + call: connect.NewClient[v1.CallRequest, v1.CallResponse]( httpClient, baseURL+VerbServiceCallProcedure, opts..., @@ -126,26 +126,26 @@ func NewVerbServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts // verbServiceClient implements VerbServiceClient. type verbServiceClient struct { - ping *connect_go.Client[v1.PingRequest, v1.PingResponse] - call *connect_go.Client[v1.CallRequest, v1.CallResponse] + ping *connect.Client[v1.PingRequest, v1.PingResponse] + call *connect.Client[v1.CallRequest, v1.CallResponse] } // Ping calls xyz.block.ftl.v1.VerbService.Ping. -func (c *verbServiceClient) Ping(ctx context.Context, req *connect_go.Request[v1.PingRequest]) (*connect_go.Response[v1.PingResponse], error) { +func (c *verbServiceClient) Ping(ctx context.Context, req *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { return c.ping.CallUnary(ctx, req) } // Call calls xyz.block.ftl.v1.VerbService.Call. -func (c *verbServiceClient) Call(ctx context.Context, req *connect_go.Request[v1.CallRequest]) (*connect_go.Response[v1.CallResponse], error) { +func (c *verbServiceClient) Call(ctx context.Context, req *connect.Request[v1.CallRequest]) (*connect.Response[v1.CallResponse], error) { return c.call.CallUnary(ctx, req) } // VerbServiceHandler is an implementation of the xyz.block.ftl.v1.VerbService service. type VerbServiceHandler interface { // Ping service for readiness. - Ping(context.Context, *connect_go.Request[v1.PingRequest]) (*connect_go.Response[v1.PingResponse], error) + Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) // Issue a synchronous call to a Verb. - Call(context.Context, *connect_go.Request[v1.CallRequest]) (*connect_go.Response[v1.CallResponse], error) + Call(context.Context, *connect.Request[v1.CallRequest]) (*connect.Response[v1.CallResponse], error) } // NewVerbServiceHandler builds an HTTP handler from the service implementation. It returns the path @@ -153,74 +153,82 @@ type VerbServiceHandler interface { // // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf // and JSON codecs. They also support gzip compression. -func NewVerbServiceHandler(svc VerbServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) { - mux := http.NewServeMux() - mux.Handle(VerbServicePingProcedure, connect_go.NewUnaryHandler( +func NewVerbServiceHandler(svc VerbServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + verbServicePingHandler := connect.NewUnaryHandler( VerbServicePingProcedure, svc.Ping, - connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), - connect_go.WithHandlerOptions(opts...), - )) - mux.Handle(VerbServiceCallProcedure, connect_go.NewUnaryHandler( + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithHandlerOptions(opts...), + ) + verbServiceCallHandler := connect.NewUnaryHandler( VerbServiceCallProcedure, svc.Call, opts..., - )) - return "/xyz.block.ftl.v1.VerbService/", mux + ) + return "/xyz.block.ftl.v1.VerbService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case VerbServicePingProcedure: + verbServicePingHandler.ServeHTTP(w, r) + case VerbServiceCallProcedure: + verbServiceCallHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) } // UnimplementedVerbServiceHandler returns CodeUnimplemented from all methods. type UnimplementedVerbServiceHandler struct{} -func (UnimplementedVerbServiceHandler) Ping(context.Context, *connect_go.Request[v1.PingRequest]) (*connect_go.Response[v1.PingResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.VerbService.Ping is not implemented")) +func (UnimplementedVerbServiceHandler) Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.VerbService.Ping is not implemented")) } -func (UnimplementedVerbServiceHandler) Call(context.Context, *connect_go.Request[v1.CallRequest]) (*connect_go.Response[v1.CallResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.VerbService.Call is not implemented")) +func (UnimplementedVerbServiceHandler) Call(context.Context, *connect.Request[v1.CallRequest]) (*connect.Response[v1.CallResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.VerbService.Call is not implemented")) } // ControllerServiceClient is a client for the xyz.block.ftl.v1.ControllerService service. type ControllerServiceClient interface { // Ping service for readiness. - Ping(context.Context, *connect_go.Request[v1.PingRequest]) (*connect_go.Response[v1.PingResponse], error) + Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) // List "processes" running on the cluster. - ProcessList(context.Context, *connect_go.Request[v1.ProcessListRequest]) (*connect_go.Response[v1.ProcessListResponse], error) - Status(context.Context, *connect_go.Request[v1.StatusRequest]) (*connect_go.Response[v1.StatusResponse], error) + ProcessList(context.Context, *connect.Request[v1.ProcessListRequest]) (*connect.Response[v1.ProcessListResponse], error) + Status(context.Context, *connect.Request[v1.StatusRequest]) (*connect.Response[v1.StatusResponse], error) // Get list of artefacts that differ between the server and client. - GetArtefactDiffs(context.Context, *connect_go.Request[v1.GetArtefactDiffsRequest]) (*connect_go.Response[v1.GetArtefactDiffsResponse], error) + GetArtefactDiffs(context.Context, *connect.Request[v1.GetArtefactDiffsRequest]) (*connect.Response[v1.GetArtefactDiffsResponse], error) // Upload an artefact to the server. - UploadArtefact(context.Context, *connect_go.Request[v1.UploadArtefactRequest]) (*connect_go.Response[v1.UploadArtefactResponse], error) + UploadArtefact(context.Context, *connect.Request[v1.UploadArtefactRequest]) (*connect.Response[v1.UploadArtefactResponse], error) // Create a deployment. - CreateDeployment(context.Context, *connect_go.Request[v1.CreateDeploymentRequest]) (*connect_go.Response[v1.CreateDeploymentResponse], error) + CreateDeployment(context.Context, *connect.Request[v1.CreateDeploymentRequest]) (*connect.Response[v1.CreateDeploymentResponse], error) // Get the schema and artefact metadata for a deployment. - GetDeployment(context.Context, *connect_go.Request[v1.GetDeploymentRequest]) (*connect_go.Response[v1.GetDeploymentResponse], error) + GetDeployment(context.Context, *connect.Request[v1.GetDeploymentRequest]) (*connect.Response[v1.GetDeploymentResponse], error) // Stream deployment artefacts from the server. // // Each artefact is streamed one after the other as a sequence of max 1MB // chunks. - GetDeploymentArtefacts(context.Context, *connect_go.Request[v1.GetDeploymentArtefactsRequest]) (*connect_go.ServerStreamForClient[v1.GetDeploymentArtefactsResponse], error) + GetDeploymentArtefacts(context.Context, *connect.Request[v1.GetDeploymentArtefactsRequest]) (*connect.ServerStreamForClient[v1.GetDeploymentArtefactsResponse], error) // Register a Runner with the Controller. // // Each runner issue a RegisterRunnerRequest to the ControllerService // every 10 seconds to maintain its heartbeat. - RegisterRunner(context.Context) *connect_go.ClientStreamForClient[v1.RegisterRunnerRequest, v1.RegisterRunnerResponse] + RegisterRunner(context.Context) *connect.ClientStreamForClient[v1.RegisterRunnerRequest, v1.RegisterRunnerResponse] // Update an existing deployment. - UpdateDeploy(context.Context, *connect_go.Request[v1.UpdateDeployRequest]) (*connect_go.Response[v1.UpdateDeployResponse], error) + UpdateDeploy(context.Context, *connect.Request[v1.UpdateDeployRequest]) (*connect.Response[v1.UpdateDeployResponse], error) // Gradually replace an existing deployment with a new one. // // If a deployment already exists for the module of the new deployment, // it will be scaled down and replaced by the new one. - ReplaceDeploy(context.Context, *connect_go.Request[v1.ReplaceDeployRequest]) (*connect_go.Response[v1.ReplaceDeployResponse], error) + ReplaceDeploy(context.Context, *connect.Request[v1.ReplaceDeployRequest]) (*connect.Response[v1.ReplaceDeployResponse], error) // Stream logs from a deployment - StreamDeploymentLogs(context.Context) *connect_go.ClientStreamForClient[v1.StreamDeploymentLogsRequest, v1.StreamDeploymentLogsResponse] + StreamDeploymentLogs(context.Context) *connect.ClientStreamForClient[v1.StreamDeploymentLogsRequest, v1.StreamDeploymentLogsResponse] // Get the full schema. - GetSchema(context.Context, *connect_go.Request[v1.GetSchemaRequest]) (*connect_go.Response[v1.GetSchemaResponse], error) + GetSchema(context.Context, *connect.Request[v1.GetSchemaRequest]) (*connect.Response[v1.GetSchemaResponse], error) // Pull schema changes from the Controller. // // Note that if there are no deployments this will block indefinitely, making it unsuitable for // just retrieving the schema. Use GetSchema for that. - PullSchema(context.Context, *connect_go.Request[v1.PullSchemaRequest]) (*connect_go.ServerStreamForClient[v1.PullSchemaResponse], error) + PullSchema(context.Context, *connect.Request[v1.PullSchemaRequest]) (*connect.ServerStreamForClient[v1.PullSchemaResponse], error) } // NewControllerServiceClient constructs a client for the xyz.block.ftl.v1.ControllerService @@ -230,76 +238,76 @@ type ControllerServiceClient interface { // // The URL supplied here should be the base URL for the Connect or gRPC server (for example, // http://api.acme.com or https://acme.com/grpc). -func NewControllerServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) ControllerServiceClient { +func NewControllerServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ControllerServiceClient { baseURL = strings.TrimRight(baseURL, "/") return &controllerServiceClient{ - ping: connect_go.NewClient[v1.PingRequest, v1.PingResponse]( + ping: connect.NewClient[v1.PingRequest, v1.PingResponse]( httpClient, baseURL+ControllerServicePingProcedure, - connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), - connect_go.WithClientOptions(opts...), + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithClientOptions(opts...), ), - processList: connect_go.NewClient[v1.ProcessListRequest, v1.ProcessListResponse]( + processList: connect.NewClient[v1.ProcessListRequest, v1.ProcessListResponse]( httpClient, baseURL+ControllerServiceProcessListProcedure, opts..., ), - status: connect_go.NewClient[v1.StatusRequest, v1.StatusResponse]( + status: connect.NewClient[v1.StatusRequest, v1.StatusResponse]( httpClient, baseURL+ControllerServiceStatusProcedure, opts..., ), - getArtefactDiffs: connect_go.NewClient[v1.GetArtefactDiffsRequest, v1.GetArtefactDiffsResponse]( + getArtefactDiffs: connect.NewClient[v1.GetArtefactDiffsRequest, v1.GetArtefactDiffsResponse]( httpClient, baseURL+ControllerServiceGetArtefactDiffsProcedure, opts..., ), - uploadArtefact: connect_go.NewClient[v1.UploadArtefactRequest, v1.UploadArtefactResponse]( + uploadArtefact: connect.NewClient[v1.UploadArtefactRequest, v1.UploadArtefactResponse]( httpClient, baseURL+ControllerServiceUploadArtefactProcedure, opts..., ), - createDeployment: connect_go.NewClient[v1.CreateDeploymentRequest, v1.CreateDeploymentResponse]( + createDeployment: connect.NewClient[v1.CreateDeploymentRequest, v1.CreateDeploymentResponse]( httpClient, baseURL+ControllerServiceCreateDeploymentProcedure, opts..., ), - getDeployment: connect_go.NewClient[v1.GetDeploymentRequest, v1.GetDeploymentResponse]( + getDeployment: connect.NewClient[v1.GetDeploymentRequest, v1.GetDeploymentResponse]( httpClient, baseURL+ControllerServiceGetDeploymentProcedure, opts..., ), - getDeploymentArtefacts: connect_go.NewClient[v1.GetDeploymentArtefactsRequest, v1.GetDeploymentArtefactsResponse]( + getDeploymentArtefacts: connect.NewClient[v1.GetDeploymentArtefactsRequest, v1.GetDeploymentArtefactsResponse]( httpClient, baseURL+ControllerServiceGetDeploymentArtefactsProcedure, opts..., ), - registerRunner: connect_go.NewClient[v1.RegisterRunnerRequest, v1.RegisterRunnerResponse]( + registerRunner: connect.NewClient[v1.RegisterRunnerRequest, v1.RegisterRunnerResponse]( httpClient, baseURL+ControllerServiceRegisterRunnerProcedure, opts..., ), - updateDeploy: connect_go.NewClient[v1.UpdateDeployRequest, v1.UpdateDeployResponse]( + updateDeploy: connect.NewClient[v1.UpdateDeployRequest, v1.UpdateDeployResponse]( httpClient, baseURL+ControllerServiceUpdateDeployProcedure, opts..., ), - replaceDeploy: connect_go.NewClient[v1.ReplaceDeployRequest, v1.ReplaceDeployResponse]( + replaceDeploy: connect.NewClient[v1.ReplaceDeployRequest, v1.ReplaceDeployResponse]( httpClient, baseURL+ControllerServiceReplaceDeployProcedure, opts..., ), - streamDeploymentLogs: connect_go.NewClient[v1.StreamDeploymentLogsRequest, v1.StreamDeploymentLogsResponse]( + streamDeploymentLogs: connect.NewClient[v1.StreamDeploymentLogsRequest, v1.StreamDeploymentLogsResponse]( httpClient, baseURL+ControllerServiceStreamDeploymentLogsProcedure, opts..., ), - getSchema: connect_go.NewClient[v1.GetSchemaRequest, v1.GetSchemaResponse]( + getSchema: connect.NewClient[v1.GetSchemaRequest, v1.GetSchemaResponse]( httpClient, baseURL+ControllerServiceGetSchemaProcedure, opts..., ), - pullSchema: connect_go.NewClient[v1.PullSchemaRequest, v1.PullSchemaResponse]( + pullSchema: connect.NewClient[v1.PullSchemaRequest, v1.PullSchemaResponse]( httpClient, baseURL+ControllerServicePullSchemaProcedure, opts..., @@ -309,133 +317,133 @@ func NewControllerServiceClient(httpClient connect_go.HTTPClient, baseURL string // controllerServiceClient implements ControllerServiceClient. type controllerServiceClient struct { - ping *connect_go.Client[v1.PingRequest, v1.PingResponse] - processList *connect_go.Client[v1.ProcessListRequest, v1.ProcessListResponse] - status *connect_go.Client[v1.StatusRequest, v1.StatusResponse] - getArtefactDiffs *connect_go.Client[v1.GetArtefactDiffsRequest, v1.GetArtefactDiffsResponse] - uploadArtefact *connect_go.Client[v1.UploadArtefactRequest, v1.UploadArtefactResponse] - createDeployment *connect_go.Client[v1.CreateDeploymentRequest, v1.CreateDeploymentResponse] - getDeployment *connect_go.Client[v1.GetDeploymentRequest, v1.GetDeploymentResponse] - getDeploymentArtefacts *connect_go.Client[v1.GetDeploymentArtefactsRequest, v1.GetDeploymentArtefactsResponse] - registerRunner *connect_go.Client[v1.RegisterRunnerRequest, v1.RegisterRunnerResponse] - updateDeploy *connect_go.Client[v1.UpdateDeployRequest, v1.UpdateDeployResponse] - replaceDeploy *connect_go.Client[v1.ReplaceDeployRequest, v1.ReplaceDeployResponse] - streamDeploymentLogs *connect_go.Client[v1.StreamDeploymentLogsRequest, v1.StreamDeploymentLogsResponse] - getSchema *connect_go.Client[v1.GetSchemaRequest, v1.GetSchemaResponse] - pullSchema *connect_go.Client[v1.PullSchemaRequest, v1.PullSchemaResponse] + ping *connect.Client[v1.PingRequest, v1.PingResponse] + processList *connect.Client[v1.ProcessListRequest, v1.ProcessListResponse] + status *connect.Client[v1.StatusRequest, v1.StatusResponse] + getArtefactDiffs *connect.Client[v1.GetArtefactDiffsRequest, v1.GetArtefactDiffsResponse] + uploadArtefact *connect.Client[v1.UploadArtefactRequest, v1.UploadArtefactResponse] + createDeployment *connect.Client[v1.CreateDeploymentRequest, v1.CreateDeploymentResponse] + getDeployment *connect.Client[v1.GetDeploymentRequest, v1.GetDeploymentResponse] + getDeploymentArtefacts *connect.Client[v1.GetDeploymentArtefactsRequest, v1.GetDeploymentArtefactsResponse] + registerRunner *connect.Client[v1.RegisterRunnerRequest, v1.RegisterRunnerResponse] + updateDeploy *connect.Client[v1.UpdateDeployRequest, v1.UpdateDeployResponse] + replaceDeploy *connect.Client[v1.ReplaceDeployRequest, v1.ReplaceDeployResponse] + streamDeploymentLogs *connect.Client[v1.StreamDeploymentLogsRequest, v1.StreamDeploymentLogsResponse] + getSchema *connect.Client[v1.GetSchemaRequest, v1.GetSchemaResponse] + pullSchema *connect.Client[v1.PullSchemaRequest, v1.PullSchemaResponse] } // Ping calls xyz.block.ftl.v1.ControllerService.Ping. -func (c *controllerServiceClient) Ping(ctx context.Context, req *connect_go.Request[v1.PingRequest]) (*connect_go.Response[v1.PingResponse], error) { +func (c *controllerServiceClient) Ping(ctx context.Context, req *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { return c.ping.CallUnary(ctx, req) } // ProcessList calls xyz.block.ftl.v1.ControllerService.ProcessList. -func (c *controllerServiceClient) ProcessList(ctx context.Context, req *connect_go.Request[v1.ProcessListRequest]) (*connect_go.Response[v1.ProcessListResponse], error) { +func (c *controllerServiceClient) ProcessList(ctx context.Context, req *connect.Request[v1.ProcessListRequest]) (*connect.Response[v1.ProcessListResponse], error) { return c.processList.CallUnary(ctx, req) } // Status calls xyz.block.ftl.v1.ControllerService.Status. -func (c *controllerServiceClient) Status(ctx context.Context, req *connect_go.Request[v1.StatusRequest]) (*connect_go.Response[v1.StatusResponse], error) { +func (c *controllerServiceClient) Status(ctx context.Context, req *connect.Request[v1.StatusRequest]) (*connect.Response[v1.StatusResponse], error) { return c.status.CallUnary(ctx, req) } // GetArtefactDiffs calls xyz.block.ftl.v1.ControllerService.GetArtefactDiffs. -func (c *controllerServiceClient) GetArtefactDiffs(ctx context.Context, req *connect_go.Request[v1.GetArtefactDiffsRequest]) (*connect_go.Response[v1.GetArtefactDiffsResponse], error) { +func (c *controllerServiceClient) GetArtefactDiffs(ctx context.Context, req *connect.Request[v1.GetArtefactDiffsRequest]) (*connect.Response[v1.GetArtefactDiffsResponse], error) { return c.getArtefactDiffs.CallUnary(ctx, req) } // UploadArtefact calls xyz.block.ftl.v1.ControllerService.UploadArtefact. -func (c *controllerServiceClient) UploadArtefact(ctx context.Context, req *connect_go.Request[v1.UploadArtefactRequest]) (*connect_go.Response[v1.UploadArtefactResponse], error) { +func (c *controllerServiceClient) UploadArtefact(ctx context.Context, req *connect.Request[v1.UploadArtefactRequest]) (*connect.Response[v1.UploadArtefactResponse], error) { return c.uploadArtefact.CallUnary(ctx, req) } // CreateDeployment calls xyz.block.ftl.v1.ControllerService.CreateDeployment. -func (c *controllerServiceClient) CreateDeployment(ctx context.Context, req *connect_go.Request[v1.CreateDeploymentRequest]) (*connect_go.Response[v1.CreateDeploymentResponse], error) { +func (c *controllerServiceClient) CreateDeployment(ctx context.Context, req *connect.Request[v1.CreateDeploymentRequest]) (*connect.Response[v1.CreateDeploymentResponse], error) { return c.createDeployment.CallUnary(ctx, req) } // GetDeployment calls xyz.block.ftl.v1.ControllerService.GetDeployment. -func (c *controllerServiceClient) GetDeployment(ctx context.Context, req *connect_go.Request[v1.GetDeploymentRequest]) (*connect_go.Response[v1.GetDeploymentResponse], error) { +func (c *controllerServiceClient) GetDeployment(ctx context.Context, req *connect.Request[v1.GetDeploymentRequest]) (*connect.Response[v1.GetDeploymentResponse], error) { return c.getDeployment.CallUnary(ctx, req) } // GetDeploymentArtefacts calls xyz.block.ftl.v1.ControllerService.GetDeploymentArtefacts. -func (c *controllerServiceClient) GetDeploymentArtefacts(ctx context.Context, req *connect_go.Request[v1.GetDeploymentArtefactsRequest]) (*connect_go.ServerStreamForClient[v1.GetDeploymentArtefactsResponse], error) { +func (c *controllerServiceClient) GetDeploymentArtefacts(ctx context.Context, req *connect.Request[v1.GetDeploymentArtefactsRequest]) (*connect.ServerStreamForClient[v1.GetDeploymentArtefactsResponse], error) { return c.getDeploymentArtefacts.CallServerStream(ctx, req) } // RegisterRunner calls xyz.block.ftl.v1.ControllerService.RegisterRunner. -func (c *controllerServiceClient) RegisterRunner(ctx context.Context) *connect_go.ClientStreamForClient[v1.RegisterRunnerRequest, v1.RegisterRunnerResponse] { +func (c *controllerServiceClient) RegisterRunner(ctx context.Context) *connect.ClientStreamForClient[v1.RegisterRunnerRequest, v1.RegisterRunnerResponse] { return c.registerRunner.CallClientStream(ctx) } // UpdateDeploy calls xyz.block.ftl.v1.ControllerService.UpdateDeploy. -func (c *controllerServiceClient) UpdateDeploy(ctx context.Context, req *connect_go.Request[v1.UpdateDeployRequest]) (*connect_go.Response[v1.UpdateDeployResponse], error) { +func (c *controllerServiceClient) UpdateDeploy(ctx context.Context, req *connect.Request[v1.UpdateDeployRequest]) (*connect.Response[v1.UpdateDeployResponse], error) { return c.updateDeploy.CallUnary(ctx, req) } // ReplaceDeploy calls xyz.block.ftl.v1.ControllerService.ReplaceDeploy. -func (c *controllerServiceClient) ReplaceDeploy(ctx context.Context, req *connect_go.Request[v1.ReplaceDeployRequest]) (*connect_go.Response[v1.ReplaceDeployResponse], error) { +func (c *controllerServiceClient) ReplaceDeploy(ctx context.Context, req *connect.Request[v1.ReplaceDeployRequest]) (*connect.Response[v1.ReplaceDeployResponse], error) { return c.replaceDeploy.CallUnary(ctx, req) } // StreamDeploymentLogs calls xyz.block.ftl.v1.ControllerService.StreamDeploymentLogs. -func (c *controllerServiceClient) StreamDeploymentLogs(ctx context.Context) *connect_go.ClientStreamForClient[v1.StreamDeploymentLogsRequest, v1.StreamDeploymentLogsResponse] { +func (c *controllerServiceClient) StreamDeploymentLogs(ctx context.Context) *connect.ClientStreamForClient[v1.StreamDeploymentLogsRequest, v1.StreamDeploymentLogsResponse] { return c.streamDeploymentLogs.CallClientStream(ctx) } // GetSchema calls xyz.block.ftl.v1.ControllerService.GetSchema. -func (c *controllerServiceClient) GetSchema(ctx context.Context, req *connect_go.Request[v1.GetSchemaRequest]) (*connect_go.Response[v1.GetSchemaResponse], error) { +func (c *controllerServiceClient) GetSchema(ctx context.Context, req *connect.Request[v1.GetSchemaRequest]) (*connect.Response[v1.GetSchemaResponse], error) { return c.getSchema.CallUnary(ctx, req) } // PullSchema calls xyz.block.ftl.v1.ControllerService.PullSchema. -func (c *controllerServiceClient) PullSchema(ctx context.Context, req *connect_go.Request[v1.PullSchemaRequest]) (*connect_go.ServerStreamForClient[v1.PullSchemaResponse], error) { +func (c *controllerServiceClient) PullSchema(ctx context.Context, req *connect.Request[v1.PullSchemaRequest]) (*connect.ServerStreamForClient[v1.PullSchemaResponse], error) { return c.pullSchema.CallServerStream(ctx, req) } // ControllerServiceHandler is an implementation of the xyz.block.ftl.v1.ControllerService service. type ControllerServiceHandler interface { // Ping service for readiness. - Ping(context.Context, *connect_go.Request[v1.PingRequest]) (*connect_go.Response[v1.PingResponse], error) + Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) // List "processes" running on the cluster. - ProcessList(context.Context, *connect_go.Request[v1.ProcessListRequest]) (*connect_go.Response[v1.ProcessListResponse], error) - Status(context.Context, *connect_go.Request[v1.StatusRequest]) (*connect_go.Response[v1.StatusResponse], error) + ProcessList(context.Context, *connect.Request[v1.ProcessListRequest]) (*connect.Response[v1.ProcessListResponse], error) + Status(context.Context, *connect.Request[v1.StatusRequest]) (*connect.Response[v1.StatusResponse], error) // Get list of artefacts that differ between the server and client. - GetArtefactDiffs(context.Context, *connect_go.Request[v1.GetArtefactDiffsRequest]) (*connect_go.Response[v1.GetArtefactDiffsResponse], error) + GetArtefactDiffs(context.Context, *connect.Request[v1.GetArtefactDiffsRequest]) (*connect.Response[v1.GetArtefactDiffsResponse], error) // Upload an artefact to the server. - UploadArtefact(context.Context, *connect_go.Request[v1.UploadArtefactRequest]) (*connect_go.Response[v1.UploadArtefactResponse], error) + UploadArtefact(context.Context, *connect.Request[v1.UploadArtefactRequest]) (*connect.Response[v1.UploadArtefactResponse], error) // Create a deployment. - CreateDeployment(context.Context, *connect_go.Request[v1.CreateDeploymentRequest]) (*connect_go.Response[v1.CreateDeploymentResponse], error) + CreateDeployment(context.Context, *connect.Request[v1.CreateDeploymentRequest]) (*connect.Response[v1.CreateDeploymentResponse], error) // Get the schema and artefact metadata for a deployment. - GetDeployment(context.Context, *connect_go.Request[v1.GetDeploymentRequest]) (*connect_go.Response[v1.GetDeploymentResponse], error) + GetDeployment(context.Context, *connect.Request[v1.GetDeploymentRequest]) (*connect.Response[v1.GetDeploymentResponse], error) // Stream deployment artefacts from the server. // // Each artefact is streamed one after the other as a sequence of max 1MB // chunks. - GetDeploymentArtefacts(context.Context, *connect_go.Request[v1.GetDeploymentArtefactsRequest], *connect_go.ServerStream[v1.GetDeploymentArtefactsResponse]) error + GetDeploymentArtefacts(context.Context, *connect.Request[v1.GetDeploymentArtefactsRequest], *connect.ServerStream[v1.GetDeploymentArtefactsResponse]) error // Register a Runner with the Controller. // // Each runner issue a RegisterRunnerRequest to the ControllerService // every 10 seconds to maintain its heartbeat. - RegisterRunner(context.Context, *connect_go.ClientStream[v1.RegisterRunnerRequest]) (*connect_go.Response[v1.RegisterRunnerResponse], error) + RegisterRunner(context.Context, *connect.ClientStream[v1.RegisterRunnerRequest]) (*connect.Response[v1.RegisterRunnerResponse], error) // Update an existing deployment. - UpdateDeploy(context.Context, *connect_go.Request[v1.UpdateDeployRequest]) (*connect_go.Response[v1.UpdateDeployResponse], error) + UpdateDeploy(context.Context, *connect.Request[v1.UpdateDeployRequest]) (*connect.Response[v1.UpdateDeployResponse], error) // Gradually replace an existing deployment with a new one. // // If a deployment already exists for the module of the new deployment, // it will be scaled down and replaced by the new one. - ReplaceDeploy(context.Context, *connect_go.Request[v1.ReplaceDeployRequest]) (*connect_go.Response[v1.ReplaceDeployResponse], error) + ReplaceDeploy(context.Context, *connect.Request[v1.ReplaceDeployRequest]) (*connect.Response[v1.ReplaceDeployResponse], error) // Stream logs from a deployment - StreamDeploymentLogs(context.Context, *connect_go.ClientStream[v1.StreamDeploymentLogsRequest]) (*connect_go.Response[v1.StreamDeploymentLogsResponse], error) + StreamDeploymentLogs(context.Context, *connect.ClientStream[v1.StreamDeploymentLogsRequest]) (*connect.Response[v1.StreamDeploymentLogsResponse], error) // Get the full schema. - GetSchema(context.Context, *connect_go.Request[v1.GetSchemaRequest]) (*connect_go.Response[v1.GetSchemaResponse], error) + GetSchema(context.Context, *connect.Request[v1.GetSchemaRequest]) (*connect.Response[v1.GetSchemaResponse], error) // Pull schema changes from the Controller. // // Note that if there are no deployments this will block indefinitely, making it unsuitable for // just retrieving the schema. Use GetSchema for that. - PullSchema(context.Context, *connect_go.Request[v1.PullSchemaRequest], *connect_go.ServerStream[v1.PullSchemaResponse]) error + PullSchema(context.Context, *connect.Request[v1.PullSchemaRequest], *connect.ServerStream[v1.PullSchemaResponse]) error } // NewControllerServiceHandler builds an HTTP handler from the service implementation. It returns @@ -443,150 +451,182 @@ type ControllerServiceHandler interface { // // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf // and JSON codecs. They also support gzip compression. -func NewControllerServiceHandler(svc ControllerServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) { - mux := http.NewServeMux() - mux.Handle(ControllerServicePingProcedure, connect_go.NewUnaryHandler( +func NewControllerServiceHandler(svc ControllerServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + controllerServicePingHandler := connect.NewUnaryHandler( ControllerServicePingProcedure, svc.Ping, - connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), - connect_go.WithHandlerOptions(opts...), - )) - mux.Handle(ControllerServiceProcessListProcedure, connect_go.NewUnaryHandler( + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithHandlerOptions(opts...), + ) + controllerServiceProcessListHandler := connect.NewUnaryHandler( ControllerServiceProcessListProcedure, svc.ProcessList, opts..., - )) - mux.Handle(ControllerServiceStatusProcedure, connect_go.NewUnaryHandler( + ) + controllerServiceStatusHandler := connect.NewUnaryHandler( ControllerServiceStatusProcedure, svc.Status, opts..., - )) - mux.Handle(ControllerServiceGetArtefactDiffsProcedure, connect_go.NewUnaryHandler( + ) + controllerServiceGetArtefactDiffsHandler := connect.NewUnaryHandler( ControllerServiceGetArtefactDiffsProcedure, svc.GetArtefactDiffs, opts..., - )) - mux.Handle(ControllerServiceUploadArtefactProcedure, connect_go.NewUnaryHandler( + ) + controllerServiceUploadArtefactHandler := connect.NewUnaryHandler( ControllerServiceUploadArtefactProcedure, svc.UploadArtefact, opts..., - )) - mux.Handle(ControllerServiceCreateDeploymentProcedure, connect_go.NewUnaryHandler( + ) + controllerServiceCreateDeploymentHandler := connect.NewUnaryHandler( ControllerServiceCreateDeploymentProcedure, svc.CreateDeployment, opts..., - )) - mux.Handle(ControllerServiceGetDeploymentProcedure, connect_go.NewUnaryHandler( + ) + controllerServiceGetDeploymentHandler := connect.NewUnaryHandler( ControllerServiceGetDeploymentProcedure, svc.GetDeployment, opts..., - )) - mux.Handle(ControllerServiceGetDeploymentArtefactsProcedure, connect_go.NewServerStreamHandler( + ) + controllerServiceGetDeploymentArtefactsHandler := connect.NewServerStreamHandler( ControllerServiceGetDeploymentArtefactsProcedure, svc.GetDeploymentArtefacts, opts..., - )) - mux.Handle(ControllerServiceRegisterRunnerProcedure, connect_go.NewClientStreamHandler( + ) + controllerServiceRegisterRunnerHandler := connect.NewClientStreamHandler( ControllerServiceRegisterRunnerProcedure, svc.RegisterRunner, opts..., - )) - mux.Handle(ControllerServiceUpdateDeployProcedure, connect_go.NewUnaryHandler( + ) + controllerServiceUpdateDeployHandler := connect.NewUnaryHandler( ControllerServiceUpdateDeployProcedure, svc.UpdateDeploy, opts..., - )) - mux.Handle(ControllerServiceReplaceDeployProcedure, connect_go.NewUnaryHandler( + ) + controllerServiceReplaceDeployHandler := connect.NewUnaryHandler( ControllerServiceReplaceDeployProcedure, svc.ReplaceDeploy, opts..., - )) - mux.Handle(ControllerServiceStreamDeploymentLogsProcedure, connect_go.NewClientStreamHandler( + ) + controllerServiceStreamDeploymentLogsHandler := connect.NewClientStreamHandler( ControllerServiceStreamDeploymentLogsProcedure, svc.StreamDeploymentLogs, opts..., - )) - mux.Handle(ControllerServiceGetSchemaProcedure, connect_go.NewUnaryHandler( + ) + controllerServiceGetSchemaHandler := connect.NewUnaryHandler( ControllerServiceGetSchemaProcedure, svc.GetSchema, opts..., - )) - mux.Handle(ControllerServicePullSchemaProcedure, connect_go.NewServerStreamHandler( + ) + controllerServicePullSchemaHandler := connect.NewServerStreamHandler( ControllerServicePullSchemaProcedure, svc.PullSchema, opts..., - )) - return "/xyz.block.ftl.v1.ControllerService/", mux + ) + return "/xyz.block.ftl.v1.ControllerService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case ControllerServicePingProcedure: + controllerServicePingHandler.ServeHTTP(w, r) + case ControllerServiceProcessListProcedure: + controllerServiceProcessListHandler.ServeHTTP(w, r) + case ControllerServiceStatusProcedure: + controllerServiceStatusHandler.ServeHTTP(w, r) + case ControllerServiceGetArtefactDiffsProcedure: + controllerServiceGetArtefactDiffsHandler.ServeHTTP(w, r) + case ControllerServiceUploadArtefactProcedure: + controllerServiceUploadArtefactHandler.ServeHTTP(w, r) + case ControllerServiceCreateDeploymentProcedure: + controllerServiceCreateDeploymentHandler.ServeHTTP(w, r) + case ControllerServiceGetDeploymentProcedure: + controllerServiceGetDeploymentHandler.ServeHTTP(w, r) + case ControllerServiceGetDeploymentArtefactsProcedure: + controllerServiceGetDeploymentArtefactsHandler.ServeHTTP(w, r) + case ControllerServiceRegisterRunnerProcedure: + controllerServiceRegisterRunnerHandler.ServeHTTP(w, r) + case ControllerServiceUpdateDeployProcedure: + controllerServiceUpdateDeployHandler.ServeHTTP(w, r) + case ControllerServiceReplaceDeployProcedure: + controllerServiceReplaceDeployHandler.ServeHTTP(w, r) + case ControllerServiceStreamDeploymentLogsProcedure: + controllerServiceStreamDeploymentLogsHandler.ServeHTTP(w, r) + case ControllerServiceGetSchemaProcedure: + controllerServiceGetSchemaHandler.ServeHTTP(w, r) + case ControllerServicePullSchemaProcedure: + controllerServicePullSchemaHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) } // UnimplementedControllerServiceHandler returns CodeUnimplemented from all methods. type UnimplementedControllerServiceHandler struct{} -func (UnimplementedControllerServiceHandler) Ping(context.Context, *connect_go.Request[v1.PingRequest]) (*connect_go.Response[v1.PingResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.Ping is not implemented")) +func (UnimplementedControllerServiceHandler) Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.Ping is not implemented")) } -func (UnimplementedControllerServiceHandler) ProcessList(context.Context, *connect_go.Request[v1.ProcessListRequest]) (*connect_go.Response[v1.ProcessListResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.ProcessList is not implemented")) +func (UnimplementedControllerServiceHandler) ProcessList(context.Context, *connect.Request[v1.ProcessListRequest]) (*connect.Response[v1.ProcessListResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.ProcessList is not implemented")) } -func (UnimplementedControllerServiceHandler) Status(context.Context, *connect_go.Request[v1.StatusRequest]) (*connect_go.Response[v1.StatusResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.Status is not implemented")) +func (UnimplementedControllerServiceHandler) Status(context.Context, *connect.Request[v1.StatusRequest]) (*connect.Response[v1.StatusResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.Status is not implemented")) } -func (UnimplementedControllerServiceHandler) GetArtefactDiffs(context.Context, *connect_go.Request[v1.GetArtefactDiffsRequest]) (*connect_go.Response[v1.GetArtefactDiffsResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.GetArtefactDiffs is not implemented")) +func (UnimplementedControllerServiceHandler) GetArtefactDiffs(context.Context, *connect.Request[v1.GetArtefactDiffsRequest]) (*connect.Response[v1.GetArtefactDiffsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.GetArtefactDiffs is not implemented")) } -func (UnimplementedControllerServiceHandler) UploadArtefact(context.Context, *connect_go.Request[v1.UploadArtefactRequest]) (*connect_go.Response[v1.UploadArtefactResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.UploadArtefact is not implemented")) +func (UnimplementedControllerServiceHandler) UploadArtefact(context.Context, *connect.Request[v1.UploadArtefactRequest]) (*connect.Response[v1.UploadArtefactResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.UploadArtefact is not implemented")) } -func (UnimplementedControllerServiceHandler) CreateDeployment(context.Context, *connect_go.Request[v1.CreateDeploymentRequest]) (*connect_go.Response[v1.CreateDeploymentResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.CreateDeployment is not implemented")) +func (UnimplementedControllerServiceHandler) CreateDeployment(context.Context, *connect.Request[v1.CreateDeploymentRequest]) (*connect.Response[v1.CreateDeploymentResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.CreateDeployment is not implemented")) } -func (UnimplementedControllerServiceHandler) GetDeployment(context.Context, *connect_go.Request[v1.GetDeploymentRequest]) (*connect_go.Response[v1.GetDeploymentResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.GetDeployment is not implemented")) +func (UnimplementedControllerServiceHandler) GetDeployment(context.Context, *connect.Request[v1.GetDeploymentRequest]) (*connect.Response[v1.GetDeploymentResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.GetDeployment is not implemented")) } -func (UnimplementedControllerServiceHandler) GetDeploymentArtefacts(context.Context, *connect_go.Request[v1.GetDeploymentArtefactsRequest], *connect_go.ServerStream[v1.GetDeploymentArtefactsResponse]) error { - return connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.GetDeploymentArtefacts is not implemented")) +func (UnimplementedControllerServiceHandler) GetDeploymentArtefacts(context.Context, *connect.Request[v1.GetDeploymentArtefactsRequest], *connect.ServerStream[v1.GetDeploymentArtefactsResponse]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.GetDeploymentArtefacts is not implemented")) } -func (UnimplementedControllerServiceHandler) RegisterRunner(context.Context, *connect_go.ClientStream[v1.RegisterRunnerRequest]) (*connect_go.Response[v1.RegisterRunnerResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.RegisterRunner is not implemented")) +func (UnimplementedControllerServiceHandler) RegisterRunner(context.Context, *connect.ClientStream[v1.RegisterRunnerRequest]) (*connect.Response[v1.RegisterRunnerResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.RegisterRunner is not implemented")) } -func (UnimplementedControllerServiceHandler) UpdateDeploy(context.Context, *connect_go.Request[v1.UpdateDeployRequest]) (*connect_go.Response[v1.UpdateDeployResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.UpdateDeploy is not implemented")) +func (UnimplementedControllerServiceHandler) UpdateDeploy(context.Context, *connect.Request[v1.UpdateDeployRequest]) (*connect.Response[v1.UpdateDeployResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.UpdateDeploy is not implemented")) } -func (UnimplementedControllerServiceHandler) ReplaceDeploy(context.Context, *connect_go.Request[v1.ReplaceDeployRequest]) (*connect_go.Response[v1.ReplaceDeployResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.ReplaceDeploy is not implemented")) +func (UnimplementedControllerServiceHandler) ReplaceDeploy(context.Context, *connect.Request[v1.ReplaceDeployRequest]) (*connect.Response[v1.ReplaceDeployResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.ReplaceDeploy is not implemented")) } -func (UnimplementedControllerServiceHandler) StreamDeploymentLogs(context.Context, *connect_go.ClientStream[v1.StreamDeploymentLogsRequest]) (*connect_go.Response[v1.StreamDeploymentLogsResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.StreamDeploymentLogs is not implemented")) +func (UnimplementedControllerServiceHandler) StreamDeploymentLogs(context.Context, *connect.ClientStream[v1.StreamDeploymentLogsRequest]) (*connect.Response[v1.StreamDeploymentLogsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.StreamDeploymentLogs is not implemented")) } -func (UnimplementedControllerServiceHandler) GetSchema(context.Context, *connect_go.Request[v1.GetSchemaRequest]) (*connect_go.Response[v1.GetSchemaResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.GetSchema is not implemented")) +func (UnimplementedControllerServiceHandler) GetSchema(context.Context, *connect.Request[v1.GetSchemaRequest]) (*connect.Response[v1.GetSchemaResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.GetSchema is not implemented")) } -func (UnimplementedControllerServiceHandler) PullSchema(context.Context, *connect_go.Request[v1.PullSchemaRequest], *connect_go.ServerStream[v1.PullSchemaResponse]) error { - return connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.PullSchema is not implemented")) +func (UnimplementedControllerServiceHandler) PullSchema(context.Context, *connect.Request[v1.PullSchemaRequest], *connect.ServerStream[v1.PullSchemaResponse]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ControllerService.PullSchema is not implemented")) } // RunnerServiceClient is a client for the xyz.block.ftl.v1.RunnerService service. type RunnerServiceClient interface { - Ping(context.Context, *connect_go.Request[v1.PingRequest]) (*connect_go.Response[v1.PingResponse], error) + Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) // Reserve synchronously reserves a Runner for a deployment but does nothing else. - Reserve(context.Context, *connect_go.Request[v1.ReserveRequest]) (*connect_go.Response[v1.ReserveResponse], error) + Reserve(context.Context, *connect.Request[v1.ReserveRequest]) (*connect.Response[v1.ReserveResponse], error) // Initiate a deployment on this Runner. - Deploy(context.Context, *connect_go.Request[v1.DeployRequest]) (*connect_go.Response[v1.DeployResponse], error) + Deploy(context.Context, *connect.Request[v1.DeployRequest]) (*connect.Response[v1.DeployResponse], error) // Terminate the deployment on this Runner. - Terminate(context.Context, *connect_go.Request[v1.TerminateRequest]) (*connect_go.Response[v1.RegisterRunnerRequest], error) + Terminate(context.Context, *connect.Request[v1.TerminateRequest]) (*connect.Response[v1.RegisterRunnerRequest], error) } // NewRunnerServiceClient constructs a client for the xyz.block.ftl.v1.RunnerService service. By @@ -596,26 +636,26 @@ type RunnerServiceClient interface { // // The URL supplied here should be the base URL for the Connect or gRPC server (for example, // http://api.acme.com or https://acme.com/grpc). -func NewRunnerServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) RunnerServiceClient { +func NewRunnerServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) RunnerServiceClient { baseURL = strings.TrimRight(baseURL, "/") return &runnerServiceClient{ - ping: connect_go.NewClient[v1.PingRequest, v1.PingResponse]( + ping: connect.NewClient[v1.PingRequest, v1.PingResponse]( httpClient, baseURL+RunnerServicePingProcedure, - connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), - connect_go.WithClientOptions(opts...), + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithClientOptions(opts...), ), - reserve: connect_go.NewClient[v1.ReserveRequest, v1.ReserveResponse]( + reserve: connect.NewClient[v1.ReserveRequest, v1.ReserveResponse]( httpClient, baseURL+RunnerServiceReserveProcedure, opts..., ), - deploy: connect_go.NewClient[v1.DeployRequest, v1.DeployResponse]( + deploy: connect.NewClient[v1.DeployRequest, v1.DeployResponse]( httpClient, baseURL+RunnerServiceDeployProcedure, opts..., ), - terminate: connect_go.NewClient[v1.TerminateRequest, v1.RegisterRunnerRequest]( + terminate: connect.NewClient[v1.TerminateRequest, v1.RegisterRunnerRequest]( httpClient, baseURL+RunnerServiceTerminateProcedure, opts..., @@ -625,41 +665,41 @@ func NewRunnerServiceClient(httpClient connect_go.HTTPClient, baseURL string, op // runnerServiceClient implements RunnerServiceClient. type runnerServiceClient struct { - ping *connect_go.Client[v1.PingRequest, v1.PingResponse] - reserve *connect_go.Client[v1.ReserveRequest, v1.ReserveResponse] - deploy *connect_go.Client[v1.DeployRequest, v1.DeployResponse] - terminate *connect_go.Client[v1.TerminateRequest, v1.RegisterRunnerRequest] + ping *connect.Client[v1.PingRequest, v1.PingResponse] + reserve *connect.Client[v1.ReserveRequest, v1.ReserveResponse] + deploy *connect.Client[v1.DeployRequest, v1.DeployResponse] + terminate *connect.Client[v1.TerminateRequest, v1.RegisterRunnerRequest] } // Ping calls xyz.block.ftl.v1.RunnerService.Ping. -func (c *runnerServiceClient) Ping(ctx context.Context, req *connect_go.Request[v1.PingRequest]) (*connect_go.Response[v1.PingResponse], error) { +func (c *runnerServiceClient) Ping(ctx context.Context, req *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { return c.ping.CallUnary(ctx, req) } // Reserve calls xyz.block.ftl.v1.RunnerService.Reserve. -func (c *runnerServiceClient) Reserve(ctx context.Context, req *connect_go.Request[v1.ReserveRequest]) (*connect_go.Response[v1.ReserveResponse], error) { +func (c *runnerServiceClient) Reserve(ctx context.Context, req *connect.Request[v1.ReserveRequest]) (*connect.Response[v1.ReserveResponse], error) { return c.reserve.CallUnary(ctx, req) } // Deploy calls xyz.block.ftl.v1.RunnerService.Deploy. -func (c *runnerServiceClient) Deploy(ctx context.Context, req *connect_go.Request[v1.DeployRequest]) (*connect_go.Response[v1.DeployResponse], error) { +func (c *runnerServiceClient) Deploy(ctx context.Context, req *connect.Request[v1.DeployRequest]) (*connect.Response[v1.DeployResponse], error) { return c.deploy.CallUnary(ctx, req) } // Terminate calls xyz.block.ftl.v1.RunnerService.Terminate. -func (c *runnerServiceClient) Terminate(ctx context.Context, req *connect_go.Request[v1.TerminateRequest]) (*connect_go.Response[v1.RegisterRunnerRequest], error) { +func (c *runnerServiceClient) Terminate(ctx context.Context, req *connect.Request[v1.TerminateRequest]) (*connect.Response[v1.RegisterRunnerRequest], error) { return c.terminate.CallUnary(ctx, req) } // RunnerServiceHandler is an implementation of the xyz.block.ftl.v1.RunnerService service. type RunnerServiceHandler interface { - Ping(context.Context, *connect_go.Request[v1.PingRequest]) (*connect_go.Response[v1.PingResponse], error) + Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) // Reserve synchronously reserves a Runner for a deployment but does nothing else. - Reserve(context.Context, *connect_go.Request[v1.ReserveRequest]) (*connect_go.Response[v1.ReserveResponse], error) + Reserve(context.Context, *connect.Request[v1.ReserveRequest]) (*connect.Response[v1.ReserveResponse], error) // Initiate a deployment on this Runner. - Deploy(context.Context, *connect_go.Request[v1.DeployRequest]) (*connect_go.Response[v1.DeployResponse], error) + Deploy(context.Context, *connect.Request[v1.DeployRequest]) (*connect.Response[v1.DeployResponse], error) // Terminate the deployment on this Runner. - Terminate(context.Context, *connect_go.Request[v1.TerminateRequest]) (*connect_go.Response[v1.RegisterRunnerRequest], error) + Terminate(context.Context, *connect.Request[v1.TerminateRequest]) (*connect.Response[v1.RegisterRunnerRequest], error) } // NewRunnerServiceHandler builds an HTTP handler from the service implementation. It returns the @@ -667,47 +707,59 @@ type RunnerServiceHandler interface { // // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf // and JSON codecs. They also support gzip compression. -func NewRunnerServiceHandler(svc RunnerServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) { - mux := http.NewServeMux() - mux.Handle(RunnerServicePingProcedure, connect_go.NewUnaryHandler( +func NewRunnerServiceHandler(svc RunnerServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + runnerServicePingHandler := connect.NewUnaryHandler( RunnerServicePingProcedure, svc.Ping, - connect_go.WithIdempotency(connect_go.IdempotencyNoSideEffects), - connect_go.WithHandlerOptions(opts...), - )) - mux.Handle(RunnerServiceReserveProcedure, connect_go.NewUnaryHandler( + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithHandlerOptions(opts...), + ) + runnerServiceReserveHandler := connect.NewUnaryHandler( RunnerServiceReserveProcedure, svc.Reserve, opts..., - )) - mux.Handle(RunnerServiceDeployProcedure, connect_go.NewUnaryHandler( + ) + runnerServiceDeployHandler := connect.NewUnaryHandler( RunnerServiceDeployProcedure, svc.Deploy, opts..., - )) - mux.Handle(RunnerServiceTerminateProcedure, connect_go.NewUnaryHandler( + ) + runnerServiceTerminateHandler := connect.NewUnaryHandler( RunnerServiceTerminateProcedure, svc.Terminate, opts..., - )) - return "/xyz.block.ftl.v1.RunnerService/", mux + ) + return "/xyz.block.ftl.v1.RunnerService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case RunnerServicePingProcedure: + runnerServicePingHandler.ServeHTTP(w, r) + case RunnerServiceReserveProcedure: + runnerServiceReserveHandler.ServeHTTP(w, r) + case RunnerServiceDeployProcedure: + runnerServiceDeployHandler.ServeHTTP(w, r) + case RunnerServiceTerminateProcedure: + runnerServiceTerminateHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) } // UnimplementedRunnerServiceHandler returns CodeUnimplemented from all methods. type UnimplementedRunnerServiceHandler struct{} -func (UnimplementedRunnerServiceHandler) Ping(context.Context, *connect_go.Request[v1.PingRequest]) (*connect_go.Response[v1.PingResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.RunnerService.Ping is not implemented")) +func (UnimplementedRunnerServiceHandler) Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.RunnerService.Ping is not implemented")) } -func (UnimplementedRunnerServiceHandler) Reserve(context.Context, *connect_go.Request[v1.ReserveRequest]) (*connect_go.Response[v1.ReserveResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.RunnerService.Reserve is not implemented")) +func (UnimplementedRunnerServiceHandler) Reserve(context.Context, *connect.Request[v1.ReserveRequest]) (*connect.Response[v1.ReserveResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.RunnerService.Reserve is not implemented")) } -func (UnimplementedRunnerServiceHandler) Deploy(context.Context, *connect_go.Request[v1.DeployRequest]) (*connect_go.Response[v1.DeployResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.RunnerService.Deploy is not implemented")) +func (UnimplementedRunnerServiceHandler) Deploy(context.Context, *connect.Request[v1.DeployRequest]) (*connect.Response[v1.DeployResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.RunnerService.Deploy is not implemented")) } -func (UnimplementedRunnerServiceHandler) Terminate(context.Context, *connect_go.Request[v1.TerminateRequest]) (*connect_go.Response[v1.RegisterRunnerRequest], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("xyz.block.ftl.v1.RunnerService.Terminate is not implemented")) +func (UnimplementedRunnerServiceHandler) Terminate(context.Context, *connect.Request[v1.TerminateRequest]) (*connect.Response[v1.RegisterRunnerRequest], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.RunnerService.Terminate is not implemented")) }