From c67c16fae9f213e842eda9c0b5f129383a8d4436 Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Sat, 24 Aug 2024 21:49:47 +1000 Subject: [PATCH] refactor: pull module-specific endpoints out into a separate service ModuleService is implemented by the controller and contains all of the endpoints that a module uses interact with FTL features - leases, FSM, etc. Note that the JVM ftl-runtime builds and passes tests, but does log: ``` 2024-08-24 22:48:15,943 ERROR [xyz.blo.ftl.run.FTLController] (grpc-default-executor-1) GRPC connection error: io.grpc.StatusRuntimeException: UNIMPLEMENTED: Method not found: xyz.block.ftl.v1.ModuleService/GetModuleContext at io.grpc.Status.asRuntimeException(Status.java:533) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:481) at io.grpc.internal.DelayedClientCall$DelayedListener$3.run(DelayedClientCall.java:489) at io.grpc.internal.DelayedClientCall$DelayedListener.delayOrExecute(DelayedClientCall.java:453) at io.grpc.internal.DelayedClientCall$DelayedListener.onClose(DelayedClientCall.java:486) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:564) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:72) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:729) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:710) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) ``` --- .github/workflows/ci.yml | 2 + backend/controller/controller.go | 1 + backend/protos/xyz/block/ftl/v1/ftl.pb.go | 542 +++++++++--------- backend/protos/xyz/block/ftl/v1/ftl.proto | 14 +- .../block/ftl/v1/ftlv1connect/ftl.connect.go | 290 ++++++---- backend/runner/runner.go | 20 - .../protos/xyz/block/ftl/v1/ftl_connect.ts | 55 +- go-runtime/ftl/leases.go | 2 +- go-runtime/internal/impl.go | 6 +- go-runtime/server/server.go | 24 +- internal/modulecontext/module_context.go | 4 +- .../xyz/block/ftl/runtime/FTLController.java | 20 +- .../xyz/block/ftl/runtime/VerbHandler.java | 20 - .../ftl/java/test/internal/FTLTestServer.java | 1 + .../java/test/internal/TestModuleServer.java | 37 ++ .../java/test/internal/TestVerbServer.java | 30 - 16 files changed, 564 insertions(+), 504 deletions(-) create mode 100644 jvm-runtime/ftl-runtime/test-framework/src/main/java/xyz/block/ftl/java/test/internal/TestModuleServer.java diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 086bfa7ec1..d5579bae2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,6 +65,7 @@ jobs: run: sqlc vet ensure-frozen-migrations: name: Ensure Frozen Migrations + if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip-ensure-frozen-migrations') }} runs-on: ubuntu-latest steps: - name: Checkout code @@ -106,6 +107,7 @@ jobs: run: just lint-scripts proto-breaking: name: Proto Breaking Change Check + if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip-proto-breaking') }} runs-on: ubuntu-latest steps: - name: Checkout code diff --git a/backend/controller/controller.go b/backend/controller/controller.go index b2fc96923c..6d5ba476f3 100644 --- a/backend/controller/controller.go +++ b/backend/controller/controller.go @@ -166,6 +166,7 @@ func Start(ctx context.Context, config Config, runnerScaling scaling.RunnerScali g.Go(func() error { return rpc.Serve(ctx, config.Bind, rpc.GRPC(ftlv1connect.NewVerbServiceHandler, svc), + rpc.GRPC(ftlv1connect.NewModuleServiceHandler, svc), rpc.GRPC(ftlv1connect.NewControllerServiceHandler, svc), rpc.GRPC(ftlv1connect.NewAdminServiceHandler, admin), rpc.GRPC(pbconsoleconnect.NewConsoleServiceHandler, console), diff --git a/backend/protos/xyz/block/ftl/v1/ftl.pb.go b/backend/protos/xyz/block/ftl/v1/ftl.pb.go index 70040409c4..4e340e5454 100644 --- a/backend/protos/xyz/block/ftl/v1/ftl.pb.go +++ b/backend/protos/xyz/block/ftl/v1/ftl.pb.go @@ -4992,218 +4992,224 @@ var file_xyz_block_ftl_v1_ftl_proto_rawDesc = []byte{ 0x53, 0x45, 0x43, 0x52, 0x45, 0x54, 0x5f, 0x4b, 0x45, 0x59, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x43, 0x52, 0x45, 0x54, 0x5f, 0x4f, 0x50, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x45, 0x43, 0x52, 0x45, 0x54, 0x5f, 0x41, 0x53, 0x4d, 0x10, 0x04, - 0x32, 0x8a, 0x05, 0x0a, 0x0b, 0x56, 0x65, 0x72, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x32, 0xa0, 0x01, 0x0a, 0x0b, 0x56, 0x65, 0x72, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x65, 0x0a, 0x10, - 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x12, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x30, 0x01, 0x12, 0x61, 0x0a, 0x0c, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x4c, 0x65, - 0x61, 0x73, 0x65, 0x12, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x4c, 0x65, - 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x78, 0x79, 0x7a, - 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x5d, 0x0a, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x46, 0x53, - 0x4d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x46, 0x53, - 0x4d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x45, 0x0a, 0x04, + 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x32, 0xc5, 0x04, 0x0a, 0x0d, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x46, 0x53, 0x4d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x4e, 0x65, 0x78, 0x74, - 0x46, 0x53, 0x4d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, - 0x46, 0x53, 0x4d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x78, + 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, + 0x01, 0x12, 0x65, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x61, 0x0a, 0x0c, 0x41, 0x63, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x46, 0x53, 0x4d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0c, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, - 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x1d, - 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x5d, 0x0a, 0x0c, 0x53, + 0x65, 0x6e, 0x64, 0x46, 0x53, 0x4d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x78, 0x79, + 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x6e, 0x64, 0x46, 0x53, 0x4d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x46, 0x53, 0x4d, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0f, 0x53, 0x65, + 0x74, 0x4e, 0x65, 0x78, 0x74, 0x46, 0x53, 0x4d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe4, 0x0b, - 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1d, 0x2e, 0x78, 0x79, - 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x78, 0x79, 0x7a, - 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, - 0x5a, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, - 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, - 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x44, 0x69, 0x66, 0x66, 0x73, 0x12, 0x29, 0x2e, 0x78, + 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x46, 0x53, 0x4d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x46, 0x53, 0x4d, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0c, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x44, 0x69, 0x66, 0x66, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, - 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x44, 0x69, 0x66, 0x66, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x74, - 0x65, 0x66, 0x61, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, - 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, - 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x2e, 0x78, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe4, 0x0b, 0x0a, 0x11, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x4a, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x5a, 0x0a, + 0x0b, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x78, + 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x1f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, + 0x65, 0x66, 0x61, 0x63, 0x74, 0x44, 0x69, 0x66, 0x66, 0x73, 0x12, 0x29, 0x2e, 0x78, 0x79, 0x7a, + 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x44, 0x69, 0x66, 0x66, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x65, + 0x66, 0x61, 0x63, 0x74, 0x44, 0x69, 0x66, 0x66, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x63, 0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x74, 0x65, 0x66, + 0x61, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x74, + 0x65, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, - 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, - 0x2f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x30, 0x01, 0x12, 0x65, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x28, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x75, 0x6e, 0x6e, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x5d, 0x0a, 0x0c, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x25, 0x2e, 0x78, 0x79, - 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, - 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, - 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0d, 0x52, 0x65, - 0x70, 0x6c, 0x61, 0x63, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x26, 0x2e, 0x78, 0x79, - 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x44, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x14, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x2d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, - 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x54, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x12, 0x22, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, - 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0a, 0x50, - 0x75, 0x6c, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x23, 0x2e, 0x78, 0x79, 0x7a, 0x2e, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x6c, - 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, - 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x6c, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x78, 0x79, - 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x73, 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd2, 0x02, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1d, - 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, - 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, - 0x02, 0x01, 0x12, 0x4e, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x12, 0x20, 0x2e, + 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x2e, 0x78, 0x79, 0x7a, + 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x60, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x78, 0x79, 0x7a, + 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x1f, 0x2e, 0x78, - 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, + 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x72, + 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, + 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x41, + 0x72, 0x74, 0x65, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x30, 0x01, 0x12, 0x65, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x75, + 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x58, 0x0a, 0x09, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x78, - 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x75, 0x6e, 0x6e, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x9f, 0x06, 0x0a, 0x0c, 0x41, 0x64, - 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x04, 0x50, 0x69, - 0x6e, 0x67, 0x12, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, - 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, - 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x57, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x54, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x47, 0x65, 0x74, 0x12, 0x22, 0x2e, 0x78, + 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x5d, 0x0a, 0x0c, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x26, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, + 0x6c, 0x61, 0x63, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, + 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x14, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x6f, + 0x67, 0x73, 0x12, 0x2d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, + 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x28, 0x01, 0x12, 0x54, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x12, 0x22, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0a, 0x50, 0x75, 0x6c, + 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x23, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, - 0x65, 0x74, 0x12, 0x22, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, - 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x12, 0x24, 0x2e, 0x78, 0x79, 0x7a, - 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, - 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x78, + 0x50, 0x75, 0x6c, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x30, 0x01, 0x12, 0x6c, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x65, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x32, 0xd2, 0x02, 0x0a, 0x0d, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x09, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x47, 0x65, 0x74, + 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x78, 0x79, + 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, + 0x12, 0x4e, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x12, 0x20, 0x2e, 0x78, 0x79, + 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4b, 0x0a, 0x06, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x1f, 0x2e, 0x78, 0x79, 0x7a, + 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x78, 0x79, + 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, + 0x09, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x78, 0x79, 0x7a, + 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, + 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, + 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0x9f, 0x06, 0x0a, 0x0c, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, + 0x12, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x03, 0x90, 0x02, 0x01, 0x12, 0x57, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x23, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, + 0x09, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x47, 0x65, 0x74, 0x12, 0x22, 0x2e, 0x78, 0x79, 0x7a, + 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, + 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x74, 0x12, 0x22, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x09, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x53, 0x65, 0x74, 0x12, 0x22, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x78, 0x79, 0x7a, - 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x5a, 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x12, 0x24, + 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x12, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x44, 0x50, 0x01, 0x5a, - 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x42, 0x44, 0x35, - 0x34, 0x35, 0x36, 0x36, 0x39, 0x37, 0x35, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x62, 0x61, 0x63, 0x6b, - 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x78, 0x79, 0x7a, 0x2f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x66, 0x74, 0x6c, 0x76, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x78, 0x79, 0x7a, + 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x54, 0x0a, 0x09, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x47, 0x65, 0x74, 0x12, 0x22, + 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x09, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x53, 0x65, 0x74, 0x12, 0x22, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, + 0x0b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x12, 0x24, 0x2e, 0x78, + 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x6e, 0x73, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, + 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x44, 0x50, 0x01, 0x5a, 0x40, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x42, 0x44, 0x35, 0x34, 0x35, + 0x36, 0x36, 0x39, 0x37, 0x35, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x78, 0x79, 0x7a, 0x2f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x66, 0x74, 0x6c, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5372,77 +5378,79 @@ var file_xyz_block_ftl_v1_ftl_proto_depIdxs = []int32{ 90, // 54: xyz.block.ftl.v1.ProcessListResponse.Process.labels:type_name -> google.protobuf.Struct 81, // 55: xyz.block.ftl.v1.ProcessListResponse.Process.runner:type_name -> xyz.block.ftl.v1.ProcessListResponse.ProcessRunner 5, // 56: xyz.block.ftl.v1.VerbService.Ping:input_type -> xyz.block.ftl.v1.PingRequest - 7, // 57: xyz.block.ftl.v1.VerbService.GetModuleContext:input_type -> xyz.block.ftl.v1.ModuleContextRequest - 12, // 58: xyz.block.ftl.v1.VerbService.AcquireLease:input_type -> xyz.block.ftl.v1.AcquireLeaseRequest - 14, // 59: xyz.block.ftl.v1.VerbService.SendFSMEvent:input_type -> xyz.block.ftl.v1.SendFSMEventRequest - 14, // 60: xyz.block.ftl.v1.VerbService.SetNextFSMEvent:input_type -> xyz.block.ftl.v1.SendFSMEventRequest - 16, // 61: xyz.block.ftl.v1.VerbService.PublishEvent:input_type -> xyz.block.ftl.v1.PublishEventRequest - 10, // 62: xyz.block.ftl.v1.VerbService.Call:input_type -> xyz.block.ftl.v1.CallRequest - 5, // 63: xyz.block.ftl.v1.ControllerService.Ping:input_type -> xyz.block.ftl.v1.PingRequest - 43, // 64: xyz.block.ftl.v1.ControllerService.ProcessList:input_type -> xyz.block.ftl.v1.ProcessListRequest - 41, // 65: xyz.block.ftl.v1.ControllerService.Status:input_type -> xyz.block.ftl.v1.StatusRequest - 22, // 66: xyz.block.ftl.v1.ControllerService.GetArtefactDiffs:input_type -> xyz.block.ftl.v1.GetArtefactDiffsRequest - 24, // 67: xyz.block.ftl.v1.ControllerService.UploadArtefact:input_type -> xyz.block.ftl.v1.UploadArtefactRequest - 27, // 68: xyz.block.ftl.v1.ControllerService.CreateDeployment:input_type -> xyz.block.ftl.v1.CreateDeploymentRequest - 31, // 69: xyz.block.ftl.v1.ControllerService.GetDeployment:input_type -> xyz.block.ftl.v1.GetDeploymentRequest - 29, // 70: xyz.block.ftl.v1.ControllerService.GetDeploymentArtefacts:input_type -> xyz.block.ftl.v1.GetDeploymentArtefactsRequest - 33, // 71: xyz.block.ftl.v1.ControllerService.RegisterRunner:input_type -> xyz.block.ftl.v1.RegisterRunnerRequest - 35, // 72: xyz.block.ftl.v1.ControllerService.UpdateDeploy:input_type -> xyz.block.ftl.v1.UpdateDeployRequest - 37, // 73: xyz.block.ftl.v1.ControllerService.ReplaceDeploy:input_type -> xyz.block.ftl.v1.ReplaceDeployRequest - 39, // 74: xyz.block.ftl.v1.ControllerService.StreamDeploymentLogs:input_type -> xyz.block.ftl.v1.StreamDeploymentLogsRequest - 18, // 75: xyz.block.ftl.v1.ControllerService.GetSchema:input_type -> xyz.block.ftl.v1.GetSchemaRequest - 20, // 76: xyz.block.ftl.v1.ControllerService.PullSchema:input_type -> xyz.block.ftl.v1.PullSchemaRequest - 45, // 77: xyz.block.ftl.v1.ControllerService.ResetSubscription:input_type -> xyz.block.ftl.v1.ResetSubscriptionRequest - 5, // 78: xyz.block.ftl.v1.RunnerService.Ping:input_type -> xyz.block.ftl.v1.PingRequest - 50, // 79: xyz.block.ftl.v1.RunnerService.Reserve:input_type -> xyz.block.ftl.v1.ReserveRequest - 47, // 80: xyz.block.ftl.v1.RunnerService.Deploy:input_type -> xyz.block.ftl.v1.DeployRequest - 49, // 81: xyz.block.ftl.v1.RunnerService.Terminate:input_type -> xyz.block.ftl.v1.TerminateRequest - 5, // 82: xyz.block.ftl.v1.AdminService.Ping:input_type -> xyz.block.ftl.v1.PingRequest - 53, // 83: xyz.block.ftl.v1.AdminService.ConfigList:input_type -> xyz.block.ftl.v1.ListConfigRequest - 55, // 84: xyz.block.ftl.v1.AdminService.ConfigGet:input_type -> xyz.block.ftl.v1.GetConfigRequest - 57, // 85: xyz.block.ftl.v1.AdminService.ConfigSet:input_type -> xyz.block.ftl.v1.SetConfigRequest - 59, // 86: xyz.block.ftl.v1.AdminService.ConfigUnset:input_type -> xyz.block.ftl.v1.UnsetConfigRequest - 61, // 87: xyz.block.ftl.v1.AdminService.SecretsList:input_type -> xyz.block.ftl.v1.ListSecretsRequest - 63, // 88: xyz.block.ftl.v1.AdminService.SecretGet:input_type -> xyz.block.ftl.v1.GetSecretRequest - 65, // 89: xyz.block.ftl.v1.AdminService.SecretSet:input_type -> xyz.block.ftl.v1.SetSecretRequest - 67, // 90: xyz.block.ftl.v1.AdminService.SecretUnset:input_type -> xyz.block.ftl.v1.UnsetSecretRequest - 6, // 91: xyz.block.ftl.v1.VerbService.Ping:output_type -> xyz.block.ftl.v1.PingResponse - 8, // 92: xyz.block.ftl.v1.VerbService.GetModuleContext:output_type -> xyz.block.ftl.v1.ModuleContextResponse - 13, // 93: xyz.block.ftl.v1.VerbService.AcquireLease:output_type -> xyz.block.ftl.v1.AcquireLeaseResponse - 15, // 94: xyz.block.ftl.v1.VerbService.SendFSMEvent:output_type -> xyz.block.ftl.v1.SendFSMEventResponse - 15, // 95: xyz.block.ftl.v1.VerbService.SetNextFSMEvent:output_type -> xyz.block.ftl.v1.SendFSMEventResponse - 17, // 96: xyz.block.ftl.v1.VerbService.PublishEvent:output_type -> xyz.block.ftl.v1.PublishEventResponse - 11, // 97: xyz.block.ftl.v1.VerbService.Call:output_type -> xyz.block.ftl.v1.CallResponse - 6, // 98: xyz.block.ftl.v1.ControllerService.Ping:output_type -> xyz.block.ftl.v1.PingResponse - 44, // 99: xyz.block.ftl.v1.ControllerService.ProcessList:output_type -> xyz.block.ftl.v1.ProcessListResponse - 42, // 100: xyz.block.ftl.v1.ControllerService.Status:output_type -> xyz.block.ftl.v1.StatusResponse - 23, // 101: xyz.block.ftl.v1.ControllerService.GetArtefactDiffs:output_type -> xyz.block.ftl.v1.GetArtefactDiffsResponse - 25, // 102: xyz.block.ftl.v1.ControllerService.UploadArtefact:output_type -> xyz.block.ftl.v1.UploadArtefactResponse - 28, // 103: xyz.block.ftl.v1.ControllerService.CreateDeployment:output_type -> xyz.block.ftl.v1.CreateDeploymentResponse - 32, // 104: xyz.block.ftl.v1.ControllerService.GetDeployment:output_type -> xyz.block.ftl.v1.GetDeploymentResponse - 30, // 105: xyz.block.ftl.v1.ControllerService.GetDeploymentArtefacts:output_type -> xyz.block.ftl.v1.GetDeploymentArtefactsResponse - 34, // 106: xyz.block.ftl.v1.ControllerService.RegisterRunner:output_type -> xyz.block.ftl.v1.RegisterRunnerResponse - 36, // 107: xyz.block.ftl.v1.ControllerService.UpdateDeploy:output_type -> xyz.block.ftl.v1.UpdateDeployResponse - 38, // 108: xyz.block.ftl.v1.ControllerService.ReplaceDeploy:output_type -> xyz.block.ftl.v1.ReplaceDeployResponse - 40, // 109: xyz.block.ftl.v1.ControllerService.StreamDeploymentLogs:output_type -> xyz.block.ftl.v1.StreamDeploymentLogsResponse - 19, // 110: xyz.block.ftl.v1.ControllerService.GetSchema:output_type -> xyz.block.ftl.v1.GetSchemaResponse - 21, // 111: xyz.block.ftl.v1.ControllerService.PullSchema:output_type -> xyz.block.ftl.v1.PullSchemaResponse - 46, // 112: xyz.block.ftl.v1.ControllerService.ResetSubscription:output_type -> xyz.block.ftl.v1.ResetSubscriptionResponse - 6, // 113: xyz.block.ftl.v1.RunnerService.Ping:output_type -> xyz.block.ftl.v1.PingResponse - 51, // 114: xyz.block.ftl.v1.RunnerService.Reserve:output_type -> xyz.block.ftl.v1.ReserveResponse - 48, // 115: xyz.block.ftl.v1.RunnerService.Deploy:output_type -> xyz.block.ftl.v1.DeployResponse - 33, // 116: xyz.block.ftl.v1.RunnerService.Terminate:output_type -> xyz.block.ftl.v1.RegisterRunnerRequest - 6, // 117: xyz.block.ftl.v1.AdminService.Ping:output_type -> xyz.block.ftl.v1.PingResponse - 54, // 118: xyz.block.ftl.v1.AdminService.ConfigList:output_type -> xyz.block.ftl.v1.ListConfigResponse - 56, // 119: xyz.block.ftl.v1.AdminService.ConfigGet:output_type -> xyz.block.ftl.v1.GetConfigResponse - 58, // 120: xyz.block.ftl.v1.AdminService.ConfigSet:output_type -> xyz.block.ftl.v1.SetConfigResponse - 60, // 121: xyz.block.ftl.v1.AdminService.ConfigUnset:output_type -> xyz.block.ftl.v1.UnsetConfigResponse - 62, // 122: xyz.block.ftl.v1.AdminService.SecretsList:output_type -> xyz.block.ftl.v1.ListSecretsResponse - 64, // 123: xyz.block.ftl.v1.AdminService.SecretGet:output_type -> xyz.block.ftl.v1.GetSecretResponse - 66, // 124: xyz.block.ftl.v1.AdminService.SecretSet:output_type -> xyz.block.ftl.v1.SetSecretResponse - 68, // 125: xyz.block.ftl.v1.AdminService.SecretUnset:output_type -> xyz.block.ftl.v1.UnsetSecretResponse - 91, // [91:126] is the sub-list for method output_type - 56, // [56:91] is the sub-list for method input_type + 10, // 57: xyz.block.ftl.v1.VerbService.Call:input_type -> xyz.block.ftl.v1.CallRequest + 5, // 58: xyz.block.ftl.v1.ModuleService.Ping:input_type -> xyz.block.ftl.v1.PingRequest + 7, // 59: xyz.block.ftl.v1.ModuleService.GetModuleContext:input_type -> xyz.block.ftl.v1.ModuleContextRequest + 12, // 60: xyz.block.ftl.v1.ModuleService.AcquireLease:input_type -> xyz.block.ftl.v1.AcquireLeaseRequest + 14, // 61: xyz.block.ftl.v1.ModuleService.SendFSMEvent:input_type -> xyz.block.ftl.v1.SendFSMEventRequest + 14, // 62: xyz.block.ftl.v1.ModuleService.SetNextFSMEvent:input_type -> xyz.block.ftl.v1.SendFSMEventRequest + 16, // 63: xyz.block.ftl.v1.ModuleService.PublishEvent:input_type -> xyz.block.ftl.v1.PublishEventRequest + 5, // 64: xyz.block.ftl.v1.ControllerService.Ping:input_type -> xyz.block.ftl.v1.PingRequest + 43, // 65: xyz.block.ftl.v1.ControllerService.ProcessList:input_type -> xyz.block.ftl.v1.ProcessListRequest + 41, // 66: xyz.block.ftl.v1.ControllerService.Status:input_type -> xyz.block.ftl.v1.StatusRequest + 22, // 67: xyz.block.ftl.v1.ControllerService.GetArtefactDiffs:input_type -> xyz.block.ftl.v1.GetArtefactDiffsRequest + 24, // 68: xyz.block.ftl.v1.ControllerService.UploadArtefact:input_type -> xyz.block.ftl.v1.UploadArtefactRequest + 27, // 69: xyz.block.ftl.v1.ControllerService.CreateDeployment:input_type -> xyz.block.ftl.v1.CreateDeploymentRequest + 31, // 70: xyz.block.ftl.v1.ControllerService.GetDeployment:input_type -> xyz.block.ftl.v1.GetDeploymentRequest + 29, // 71: xyz.block.ftl.v1.ControllerService.GetDeploymentArtefacts:input_type -> xyz.block.ftl.v1.GetDeploymentArtefactsRequest + 33, // 72: xyz.block.ftl.v1.ControllerService.RegisterRunner:input_type -> xyz.block.ftl.v1.RegisterRunnerRequest + 35, // 73: xyz.block.ftl.v1.ControllerService.UpdateDeploy:input_type -> xyz.block.ftl.v1.UpdateDeployRequest + 37, // 74: xyz.block.ftl.v1.ControllerService.ReplaceDeploy:input_type -> xyz.block.ftl.v1.ReplaceDeployRequest + 39, // 75: xyz.block.ftl.v1.ControllerService.StreamDeploymentLogs:input_type -> xyz.block.ftl.v1.StreamDeploymentLogsRequest + 18, // 76: xyz.block.ftl.v1.ControllerService.GetSchema:input_type -> xyz.block.ftl.v1.GetSchemaRequest + 20, // 77: xyz.block.ftl.v1.ControllerService.PullSchema:input_type -> xyz.block.ftl.v1.PullSchemaRequest + 45, // 78: xyz.block.ftl.v1.ControllerService.ResetSubscription:input_type -> xyz.block.ftl.v1.ResetSubscriptionRequest + 5, // 79: xyz.block.ftl.v1.RunnerService.Ping:input_type -> xyz.block.ftl.v1.PingRequest + 50, // 80: xyz.block.ftl.v1.RunnerService.Reserve:input_type -> xyz.block.ftl.v1.ReserveRequest + 47, // 81: xyz.block.ftl.v1.RunnerService.Deploy:input_type -> xyz.block.ftl.v1.DeployRequest + 49, // 82: xyz.block.ftl.v1.RunnerService.Terminate:input_type -> xyz.block.ftl.v1.TerminateRequest + 5, // 83: xyz.block.ftl.v1.AdminService.Ping:input_type -> xyz.block.ftl.v1.PingRequest + 53, // 84: xyz.block.ftl.v1.AdminService.ConfigList:input_type -> xyz.block.ftl.v1.ListConfigRequest + 55, // 85: xyz.block.ftl.v1.AdminService.ConfigGet:input_type -> xyz.block.ftl.v1.GetConfigRequest + 57, // 86: xyz.block.ftl.v1.AdminService.ConfigSet:input_type -> xyz.block.ftl.v1.SetConfigRequest + 59, // 87: xyz.block.ftl.v1.AdminService.ConfigUnset:input_type -> xyz.block.ftl.v1.UnsetConfigRequest + 61, // 88: xyz.block.ftl.v1.AdminService.SecretsList:input_type -> xyz.block.ftl.v1.ListSecretsRequest + 63, // 89: xyz.block.ftl.v1.AdminService.SecretGet:input_type -> xyz.block.ftl.v1.GetSecretRequest + 65, // 90: xyz.block.ftl.v1.AdminService.SecretSet:input_type -> xyz.block.ftl.v1.SetSecretRequest + 67, // 91: xyz.block.ftl.v1.AdminService.SecretUnset:input_type -> xyz.block.ftl.v1.UnsetSecretRequest + 6, // 92: xyz.block.ftl.v1.VerbService.Ping:output_type -> xyz.block.ftl.v1.PingResponse + 11, // 93: xyz.block.ftl.v1.VerbService.Call:output_type -> xyz.block.ftl.v1.CallResponse + 6, // 94: xyz.block.ftl.v1.ModuleService.Ping:output_type -> xyz.block.ftl.v1.PingResponse + 8, // 95: xyz.block.ftl.v1.ModuleService.GetModuleContext:output_type -> xyz.block.ftl.v1.ModuleContextResponse + 13, // 96: xyz.block.ftl.v1.ModuleService.AcquireLease:output_type -> xyz.block.ftl.v1.AcquireLeaseResponse + 15, // 97: xyz.block.ftl.v1.ModuleService.SendFSMEvent:output_type -> xyz.block.ftl.v1.SendFSMEventResponse + 15, // 98: xyz.block.ftl.v1.ModuleService.SetNextFSMEvent:output_type -> xyz.block.ftl.v1.SendFSMEventResponse + 17, // 99: xyz.block.ftl.v1.ModuleService.PublishEvent:output_type -> xyz.block.ftl.v1.PublishEventResponse + 6, // 100: xyz.block.ftl.v1.ControllerService.Ping:output_type -> xyz.block.ftl.v1.PingResponse + 44, // 101: xyz.block.ftl.v1.ControllerService.ProcessList:output_type -> xyz.block.ftl.v1.ProcessListResponse + 42, // 102: xyz.block.ftl.v1.ControllerService.Status:output_type -> xyz.block.ftl.v1.StatusResponse + 23, // 103: xyz.block.ftl.v1.ControllerService.GetArtefactDiffs:output_type -> xyz.block.ftl.v1.GetArtefactDiffsResponse + 25, // 104: xyz.block.ftl.v1.ControllerService.UploadArtefact:output_type -> xyz.block.ftl.v1.UploadArtefactResponse + 28, // 105: xyz.block.ftl.v1.ControllerService.CreateDeployment:output_type -> xyz.block.ftl.v1.CreateDeploymentResponse + 32, // 106: xyz.block.ftl.v1.ControllerService.GetDeployment:output_type -> xyz.block.ftl.v1.GetDeploymentResponse + 30, // 107: xyz.block.ftl.v1.ControllerService.GetDeploymentArtefacts:output_type -> xyz.block.ftl.v1.GetDeploymentArtefactsResponse + 34, // 108: xyz.block.ftl.v1.ControllerService.RegisterRunner:output_type -> xyz.block.ftl.v1.RegisterRunnerResponse + 36, // 109: xyz.block.ftl.v1.ControllerService.UpdateDeploy:output_type -> xyz.block.ftl.v1.UpdateDeployResponse + 38, // 110: xyz.block.ftl.v1.ControllerService.ReplaceDeploy:output_type -> xyz.block.ftl.v1.ReplaceDeployResponse + 40, // 111: xyz.block.ftl.v1.ControllerService.StreamDeploymentLogs:output_type -> xyz.block.ftl.v1.StreamDeploymentLogsResponse + 19, // 112: xyz.block.ftl.v1.ControllerService.GetSchema:output_type -> xyz.block.ftl.v1.GetSchemaResponse + 21, // 113: xyz.block.ftl.v1.ControllerService.PullSchema:output_type -> xyz.block.ftl.v1.PullSchemaResponse + 46, // 114: xyz.block.ftl.v1.ControllerService.ResetSubscription:output_type -> xyz.block.ftl.v1.ResetSubscriptionResponse + 6, // 115: xyz.block.ftl.v1.RunnerService.Ping:output_type -> xyz.block.ftl.v1.PingResponse + 51, // 116: xyz.block.ftl.v1.RunnerService.Reserve:output_type -> xyz.block.ftl.v1.ReserveResponse + 48, // 117: xyz.block.ftl.v1.RunnerService.Deploy:output_type -> xyz.block.ftl.v1.DeployResponse + 33, // 118: xyz.block.ftl.v1.RunnerService.Terminate:output_type -> xyz.block.ftl.v1.RegisterRunnerRequest + 6, // 119: xyz.block.ftl.v1.AdminService.Ping:output_type -> xyz.block.ftl.v1.PingResponse + 54, // 120: xyz.block.ftl.v1.AdminService.ConfigList:output_type -> xyz.block.ftl.v1.ListConfigResponse + 56, // 121: xyz.block.ftl.v1.AdminService.ConfigGet:output_type -> xyz.block.ftl.v1.GetConfigResponse + 58, // 122: xyz.block.ftl.v1.AdminService.ConfigSet:output_type -> xyz.block.ftl.v1.SetConfigResponse + 60, // 123: xyz.block.ftl.v1.AdminService.ConfigUnset:output_type -> xyz.block.ftl.v1.UnsetConfigResponse + 62, // 124: xyz.block.ftl.v1.AdminService.SecretsList:output_type -> xyz.block.ftl.v1.ListSecretsResponse + 64, // 125: xyz.block.ftl.v1.AdminService.SecretGet:output_type -> xyz.block.ftl.v1.GetSecretResponse + 66, // 126: xyz.block.ftl.v1.AdminService.SecretSet:output_type -> xyz.block.ftl.v1.SetSecretResponse + 68, // 127: xyz.block.ftl.v1.AdminService.SecretUnset:output_type -> xyz.block.ftl.v1.UnsetSecretResponse + 92, // [92:128] is the sub-list for method output_type + 56, // [56:92] is the sub-list for method input_type 56, // [56:56] is the sub-list for extension type_name 56, // [56:56] is the sub-list for extension extendee 0, // [0:56] is the sub-list for field type_name @@ -6410,7 +6418,7 @@ func file_xyz_block_ftl_v1_ftl_proto_init() { NumEnums: 5, NumMessages: 80, NumExtensions: 0, - NumServices: 4, + NumServices: 5, }, GoTypes: file_xyz_block_ftl_v1_ftl_proto_goTypes, DependencyIndexes: file_xyz_block_ftl_v1_ftl_proto_depIdxs, diff --git a/backend/protos/xyz/block/ftl/v1/ftl.proto b/backend/protos/xyz/block/ftl/v1/ftl.proto index 060d73a8d1..dd6269b8b6 100644 --- a/backend/protos/xyz/block/ftl/v1/ftl.proto +++ b/backend/protos/xyz/block/ftl/v1/ftl.proto @@ -104,6 +104,17 @@ service VerbService { option idempotency_level = NO_SIDE_EFFECTS; } + // Issue a synchronous call to a Verb. + rpc Call(CallRequest) returns (CallResponse); +} + +// ModuleService is the service that modules use to interact with the Controller. +service ModuleService { + // Ping service for readiness. + rpc Ping(PingRequest) returns (PingResponse) { + option idempotency_level = NO_SIDE_EFFECTS; + } + // Get configuration state for the module rpc GetModuleContext(ModuleContextRequest) returns (stream ModuleContextResponse); @@ -120,9 +131,6 @@ service VerbService { // Publish an event to a topic. rpc PublishEvent(PublishEventRequest) returns (PublishEventResponse); - - // Issue a synchronous call to a Verb. - rpc Call(CallRequest) returns (CallResponse); } enum DeploymentChangeType { diff --git a/backend/protos/xyz/block/ftl/v1/ftlv1connect/ftl.connect.go b/backend/protos/xyz/block/ftl/v1/ftlv1connect/ftl.connect.go index d423ab1558..8e0ab56e5d 100644 --- a/backend/protos/xyz/block/ftl/v1/ftlv1connect/ftl.connect.go +++ b/backend/protos/xyz/block/ftl/v1/ftlv1connect/ftl.connect.go @@ -23,6 +23,8 @@ const _ = connect.IsAtLeastVersion1_7_0 const ( // VerbServiceName is the fully-qualified name of the VerbService service. VerbServiceName = "xyz.block.ftl.v1.VerbService" + // ModuleServiceName is the fully-qualified name of the ModuleService service. + ModuleServiceName = "xyz.block.ftl.v1.ModuleService" // ControllerServiceName is the fully-qualified name of the ControllerService service. ControllerServiceName = "xyz.block.ftl.v1.ControllerService" // RunnerServiceName is the fully-qualified name of the RunnerService service. @@ -41,23 +43,25 @@ const ( const ( // VerbServicePingProcedure is the fully-qualified name of the VerbService's Ping RPC. VerbServicePingProcedure = "/xyz.block.ftl.v1.VerbService/Ping" - // VerbServiceGetModuleContextProcedure is the fully-qualified name of the VerbService's - // GetModuleContext RPC. - VerbServiceGetModuleContextProcedure = "/xyz.block.ftl.v1.VerbService/GetModuleContext" - // VerbServiceAcquireLeaseProcedure is the fully-qualified name of the VerbService's AcquireLease - // RPC. - VerbServiceAcquireLeaseProcedure = "/xyz.block.ftl.v1.VerbService/AcquireLease" - // VerbServiceSendFSMEventProcedure is the fully-qualified name of the VerbService's SendFSMEvent - // RPC. - VerbServiceSendFSMEventProcedure = "/xyz.block.ftl.v1.VerbService/SendFSMEvent" - // VerbServiceSetNextFSMEventProcedure is the fully-qualified name of the VerbService's - // SetNextFSMEvent RPC. - VerbServiceSetNextFSMEventProcedure = "/xyz.block.ftl.v1.VerbService/SetNextFSMEvent" - // VerbServicePublishEventProcedure is the fully-qualified name of the VerbService's PublishEvent - // RPC. - VerbServicePublishEventProcedure = "/xyz.block.ftl.v1.VerbService/PublishEvent" // VerbServiceCallProcedure is the fully-qualified name of the VerbService's Call RPC. VerbServiceCallProcedure = "/xyz.block.ftl.v1.VerbService/Call" + // ModuleServicePingProcedure is the fully-qualified name of the ModuleService's Ping RPC. + ModuleServicePingProcedure = "/xyz.block.ftl.v1.ModuleService/Ping" + // ModuleServiceGetModuleContextProcedure is the fully-qualified name of the ModuleService's + // GetModuleContext RPC. + ModuleServiceGetModuleContextProcedure = "/xyz.block.ftl.v1.ModuleService/GetModuleContext" + // ModuleServiceAcquireLeaseProcedure is the fully-qualified name of the ModuleService's + // AcquireLease RPC. + ModuleServiceAcquireLeaseProcedure = "/xyz.block.ftl.v1.ModuleService/AcquireLease" + // ModuleServiceSendFSMEventProcedure is the fully-qualified name of the ModuleService's + // SendFSMEvent RPC. + ModuleServiceSendFSMEventProcedure = "/xyz.block.ftl.v1.ModuleService/SendFSMEvent" + // ModuleServiceSetNextFSMEventProcedure is the fully-qualified name of the ModuleService's + // SetNextFSMEvent RPC. + ModuleServiceSetNextFSMEventProcedure = "/xyz.block.ftl.v1.ModuleService/SetNextFSMEvent" + // ModuleServicePublishEventProcedure is the fully-qualified name of the ModuleService's + // PublishEvent RPC. + ModuleServicePublishEventProcedure = "/xyz.block.ftl.v1.ModuleService/PublishEvent" // ControllerServicePingProcedure is the fully-qualified name of the ControllerService's Ping RPC. ControllerServicePingProcedure = "/xyz.block.ftl.v1.ControllerService/Ping" // ControllerServiceProcessListProcedure is the fully-qualified name of the ControllerService's @@ -135,6 +139,102 @@ const ( // VerbServiceClient is a client for the xyz.block.ftl.v1.VerbService service. type VerbServiceClient interface { + // Ping service for readiness. + Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) + // Issue a synchronous call to a Verb. + 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 +// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, +// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the +// connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// 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.HTTPClient, baseURL string, opts ...connect.ClientOption) VerbServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &verbServiceClient{ + ping: connect.NewClient[v1.PingRequest, v1.PingResponse]( + httpClient, + baseURL+VerbServicePingProcedure, + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithClientOptions(opts...), + ), + call: connect.NewClient[v1.CallRequest, v1.CallResponse]( + httpClient, + baseURL+VerbServiceCallProcedure, + opts..., + ), + } +} + +// verbServiceClient implements VerbServiceClient. +type verbServiceClient struct { + 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.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.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.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) + // Issue a synchronous call to a Verb. + 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 +// on which to mount the handler and the handler itself. +// +// 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.HandlerOption) (string, http.Handler) { + verbServicePingHandler := connect.NewUnaryHandler( + VerbServicePingProcedure, + svc.Ping, + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithHandlerOptions(opts...), + ) + verbServiceCallHandler := connect.NewUnaryHandler( + VerbServiceCallProcedure, + svc.Call, + opts..., + ) + 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.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.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")) +} + +// ModuleServiceClient is a client for the xyz.block.ftl.v1.ModuleService service. +type ModuleServiceClient interface { // Ping service for readiness. Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) // Get configuration state for the module @@ -149,107 +249,94 @@ type VerbServiceClient interface { SetNextFSMEvent(context.Context, *connect.Request[v1.SendFSMEventRequest]) (*connect.Response[v1.SendFSMEventResponse], error) // Publish an event to a topic. PublishEvent(context.Context, *connect.Request[v1.PublishEventRequest]) (*connect.Response[v1.PublishEventResponse], error) - // Issue a synchronous call to a Verb. - 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 +// NewModuleServiceClient constructs a client for the xyz.block.ftl.v1.ModuleService service. By // default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, // and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the // connect.WithGRPC() or connect.WithGRPCWeb() options. // // 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.HTTPClient, baseURL string, opts ...connect.ClientOption) VerbServiceClient { +func NewModuleServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ModuleServiceClient { baseURL = strings.TrimRight(baseURL, "/") - return &verbServiceClient{ + return &moduleServiceClient{ ping: connect.NewClient[v1.PingRequest, v1.PingResponse]( httpClient, - baseURL+VerbServicePingProcedure, + baseURL+ModuleServicePingProcedure, connect.WithIdempotency(connect.IdempotencyNoSideEffects), connect.WithClientOptions(opts...), ), getModuleContext: connect.NewClient[v1.ModuleContextRequest, v1.ModuleContextResponse]( httpClient, - baseURL+VerbServiceGetModuleContextProcedure, + baseURL+ModuleServiceGetModuleContextProcedure, opts..., ), acquireLease: connect.NewClient[v1.AcquireLeaseRequest, v1.AcquireLeaseResponse]( httpClient, - baseURL+VerbServiceAcquireLeaseProcedure, + baseURL+ModuleServiceAcquireLeaseProcedure, opts..., ), sendFSMEvent: connect.NewClient[v1.SendFSMEventRequest, v1.SendFSMEventResponse]( httpClient, - baseURL+VerbServiceSendFSMEventProcedure, + baseURL+ModuleServiceSendFSMEventProcedure, opts..., ), setNextFSMEvent: connect.NewClient[v1.SendFSMEventRequest, v1.SendFSMEventResponse]( httpClient, - baseURL+VerbServiceSetNextFSMEventProcedure, + baseURL+ModuleServiceSetNextFSMEventProcedure, opts..., ), publishEvent: connect.NewClient[v1.PublishEventRequest, v1.PublishEventResponse]( httpClient, - baseURL+VerbServicePublishEventProcedure, - opts..., - ), - call: connect.NewClient[v1.CallRequest, v1.CallResponse]( - httpClient, - baseURL+VerbServiceCallProcedure, + baseURL+ModuleServicePublishEventProcedure, opts..., ), } } -// verbServiceClient implements VerbServiceClient. -type verbServiceClient struct { +// moduleServiceClient implements ModuleServiceClient. +type moduleServiceClient struct { ping *connect.Client[v1.PingRequest, v1.PingResponse] getModuleContext *connect.Client[v1.ModuleContextRequest, v1.ModuleContextResponse] acquireLease *connect.Client[v1.AcquireLeaseRequest, v1.AcquireLeaseResponse] sendFSMEvent *connect.Client[v1.SendFSMEventRequest, v1.SendFSMEventResponse] setNextFSMEvent *connect.Client[v1.SendFSMEventRequest, v1.SendFSMEventResponse] publishEvent *connect.Client[v1.PublishEventRequest, v1.PublishEventResponse] - call *connect.Client[v1.CallRequest, v1.CallResponse] } -// Ping calls xyz.block.ftl.v1.VerbService.Ping. -func (c *verbServiceClient) Ping(ctx context.Context, req *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { +// Ping calls xyz.block.ftl.v1.ModuleService.Ping. +func (c *moduleServiceClient) Ping(ctx context.Context, req *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { return c.ping.CallUnary(ctx, req) } -// GetModuleContext calls xyz.block.ftl.v1.VerbService.GetModuleContext. -func (c *verbServiceClient) GetModuleContext(ctx context.Context, req *connect.Request[v1.ModuleContextRequest]) (*connect.ServerStreamForClient[v1.ModuleContextResponse], error) { +// GetModuleContext calls xyz.block.ftl.v1.ModuleService.GetModuleContext. +func (c *moduleServiceClient) GetModuleContext(ctx context.Context, req *connect.Request[v1.ModuleContextRequest]) (*connect.ServerStreamForClient[v1.ModuleContextResponse], error) { return c.getModuleContext.CallServerStream(ctx, req) } -// AcquireLease calls xyz.block.ftl.v1.VerbService.AcquireLease. -func (c *verbServiceClient) AcquireLease(ctx context.Context) *connect.BidiStreamForClient[v1.AcquireLeaseRequest, v1.AcquireLeaseResponse] { +// AcquireLease calls xyz.block.ftl.v1.ModuleService.AcquireLease. +func (c *moduleServiceClient) AcquireLease(ctx context.Context) *connect.BidiStreamForClient[v1.AcquireLeaseRequest, v1.AcquireLeaseResponse] { return c.acquireLease.CallBidiStream(ctx) } -// SendFSMEvent calls xyz.block.ftl.v1.VerbService.SendFSMEvent. -func (c *verbServiceClient) SendFSMEvent(ctx context.Context, req *connect.Request[v1.SendFSMEventRequest]) (*connect.Response[v1.SendFSMEventResponse], error) { +// SendFSMEvent calls xyz.block.ftl.v1.ModuleService.SendFSMEvent. +func (c *moduleServiceClient) SendFSMEvent(ctx context.Context, req *connect.Request[v1.SendFSMEventRequest]) (*connect.Response[v1.SendFSMEventResponse], error) { return c.sendFSMEvent.CallUnary(ctx, req) } -// SetNextFSMEvent calls xyz.block.ftl.v1.VerbService.SetNextFSMEvent. -func (c *verbServiceClient) SetNextFSMEvent(ctx context.Context, req *connect.Request[v1.SendFSMEventRequest]) (*connect.Response[v1.SendFSMEventResponse], error) { +// SetNextFSMEvent calls xyz.block.ftl.v1.ModuleService.SetNextFSMEvent. +func (c *moduleServiceClient) SetNextFSMEvent(ctx context.Context, req *connect.Request[v1.SendFSMEventRequest]) (*connect.Response[v1.SendFSMEventResponse], error) { return c.setNextFSMEvent.CallUnary(ctx, req) } -// PublishEvent calls xyz.block.ftl.v1.VerbService.PublishEvent. -func (c *verbServiceClient) PublishEvent(ctx context.Context, req *connect.Request[v1.PublishEventRequest]) (*connect.Response[v1.PublishEventResponse], error) { +// PublishEvent calls xyz.block.ftl.v1.ModuleService.PublishEvent. +func (c *moduleServiceClient) PublishEvent(ctx context.Context, req *connect.Request[v1.PublishEventRequest]) (*connect.Response[v1.PublishEventResponse], error) { return c.publishEvent.CallUnary(ctx, req) } -// Call calls xyz.block.ftl.v1.VerbService.Call. -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 { +// ModuleServiceHandler is an implementation of the xyz.block.ftl.v1.ModuleService service. +type ModuleServiceHandler interface { // Ping service for readiness. Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) // Get configuration state for the module @@ -264,103 +351,90 @@ type VerbServiceHandler interface { SetNextFSMEvent(context.Context, *connect.Request[v1.SendFSMEventRequest]) (*connect.Response[v1.SendFSMEventResponse], error) // Publish an event to a topic. PublishEvent(context.Context, *connect.Request[v1.PublishEventRequest]) (*connect.Response[v1.PublishEventResponse], error) - // Issue a synchronous call to a Verb. - 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 -// on which to mount the handler and the handler itself. +// NewModuleServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. // // 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.HandlerOption) (string, http.Handler) { - verbServicePingHandler := connect.NewUnaryHandler( - VerbServicePingProcedure, +func NewModuleServiceHandler(svc ModuleServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + moduleServicePingHandler := connect.NewUnaryHandler( + ModuleServicePingProcedure, svc.Ping, connect.WithIdempotency(connect.IdempotencyNoSideEffects), connect.WithHandlerOptions(opts...), ) - verbServiceGetModuleContextHandler := connect.NewServerStreamHandler( - VerbServiceGetModuleContextProcedure, + moduleServiceGetModuleContextHandler := connect.NewServerStreamHandler( + ModuleServiceGetModuleContextProcedure, svc.GetModuleContext, opts..., ) - verbServiceAcquireLeaseHandler := connect.NewBidiStreamHandler( - VerbServiceAcquireLeaseProcedure, + moduleServiceAcquireLeaseHandler := connect.NewBidiStreamHandler( + ModuleServiceAcquireLeaseProcedure, svc.AcquireLease, opts..., ) - verbServiceSendFSMEventHandler := connect.NewUnaryHandler( - VerbServiceSendFSMEventProcedure, + moduleServiceSendFSMEventHandler := connect.NewUnaryHandler( + ModuleServiceSendFSMEventProcedure, svc.SendFSMEvent, opts..., ) - verbServiceSetNextFSMEventHandler := connect.NewUnaryHandler( - VerbServiceSetNextFSMEventProcedure, + moduleServiceSetNextFSMEventHandler := connect.NewUnaryHandler( + ModuleServiceSetNextFSMEventProcedure, svc.SetNextFSMEvent, opts..., ) - verbServicePublishEventHandler := connect.NewUnaryHandler( - VerbServicePublishEventProcedure, + moduleServicePublishEventHandler := connect.NewUnaryHandler( + ModuleServicePublishEventProcedure, svc.PublishEvent, opts..., ) - verbServiceCallHandler := connect.NewUnaryHandler( - VerbServiceCallProcedure, - svc.Call, - opts..., - ) - return "/xyz.block.ftl.v1.VerbService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + return "/xyz.block.ftl.v1.ModuleService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { - case VerbServicePingProcedure: - verbServicePingHandler.ServeHTTP(w, r) - case VerbServiceGetModuleContextProcedure: - verbServiceGetModuleContextHandler.ServeHTTP(w, r) - case VerbServiceAcquireLeaseProcedure: - verbServiceAcquireLeaseHandler.ServeHTTP(w, r) - case VerbServiceSendFSMEventProcedure: - verbServiceSendFSMEventHandler.ServeHTTP(w, r) - case VerbServiceSetNextFSMEventProcedure: - verbServiceSetNextFSMEventHandler.ServeHTTP(w, r) - case VerbServicePublishEventProcedure: - verbServicePublishEventHandler.ServeHTTP(w, r) - case VerbServiceCallProcedure: - verbServiceCallHandler.ServeHTTP(w, r) + case ModuleServicePingProcedure: + moduleServicePingHandler.ServeHTTP(w, r) + case ModuleServiceGetModuleContextProcedure: + moduleServiceGetModuleContextHandler.ServeHTTP(w, r) + case ModuleServiceAcquireLeaseProcedure: + moduleServiceAcquireLeaseHandler.ServeHTTP(w, r) + case ModuleServiceSendFSMEventProcedure: + moduleServiceSendFSMEventHandler.ServeHTTP(w, r) + case ModuleServiceSetNextFSMEventProcedure: + moduleServiceSetNextFSMEventHandler.ServeHTTP(w, r) + case ModuleServicePublishEventProcedure: + moduleServicePublishEventHandler.ServeHTTP(w, r) default: http.NotFound(w, r) } }) } -// UnimplementedVerbServiceHandler returns CodeUnimplemented from all methods. -type UnimplementedVerbServiceHandler struct{} +// UnimplementedModuleServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedModuleServiceHandler struct{} -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 (UnimplementedModuleServiceHandler) Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ModuleService.Ping is not implemented")) } -func (UnimplementedVerbServiceHandler) GetModuleContext(context.Context, *connect.Request[v1.ModuleContextRequest], *connect.ServerStream[v1.ModuleContextResponse]) error { - return connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.VerbService.GetModuleContext is not implemented")) +func (UnimplementedModuleServiceHandler) GetModuleContext(context.Context, *connect.Request[v1.ModuleContextRequest], *connect.ServerStream[v1.ModuleContextResponse]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ModuleService.GetModuleContext is not implemented")) } -func (UnimplementedVerbServiceHandler) AcquireLease(context.Context, *connect.BidiStream[v1.AcquireLeaseRequest, v1.AcquireLeaseResponse]) error { - return connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.VerbService.AcquireLease is not implemented")) +func (UnimplementedModuleServiceHandler) AcquireLease(context.Context, *connect.BidiStream[v1.AcquireLeaseRequest, v1.AcquireLeaseResponse]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ModuleService.AcquireLease is not implemented")) } -func (UnimplementedVerbServiceHandler) SendFSMEvent(context.Context, *connect.Request[v1.SendFSMEventRequest]) (*connect.Response[v1.SendFSMEventResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.VerbService.SendFSMEvent is not implemented")) +func (UnimplementedModuleServiceHandler) SendFSMEvent(context.Context, *connect.Request[v1.SendFSMEventRequest]) (*connect.Response[v1.SendFSMEventResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ModuleService.SendFSMEvent is not implemented")) } -func (UnimplementedVerbServiceHandler) SetNextFSMEvent(context.Context, *connect.Request[v1.SendFSMEventRequest]) (*connect.Response[v1.SendFSMEventResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.VerbService.SetNextFSMEvent is not implemented")) +func (UnimplementedModuleServiceHandler) SetNextFSMEvent(context.Context, *connect.Request[v1.SendFSMEventRequest]) (*connect.Response[v1.SendFSMEventResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ModuleService.SetNextFSMEvent is not implemented")) } -func (UnimplementedVerbServiceHandler) PublishEvent(context.Context, *connect.Request[v1.PublishEventRequest]) (*connect.Response[v1.PublishEventResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.VerbService.PublishEvent 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")) +func (UnimplementedModuleServiceHandler) PublishEvent(context.Context, *connect.Request[v1.PublishEventRequest]) (*connect.Response[v1.PublishEventResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.ModuleService.PublishEvent is not implemented")) } // ControllerServiceClient is a client for the xyz.block.ftl.v1.ControllerService service. diff --git a/backend/runner/runner.go b/backend/runner/runner.go index 6942f44cf4..e5195946cd 100644 --- a/backend/runner/runner.go +++ b/backend/runner/runner.go @@ -229,26 +229,6 @@ func (s *Service) Ping(ctx context.Context, req *connect.Request[ftlv1.PingReque return connect.NewResponse(&ftlv1.PingResponse{}), nil } -func (s *Service) GetModuleContext(ctx context.Context, req *connect.Request[ftlv1.ModuleContextRequest], resp *connect.ServerStream[ftlv1.ModuleContextResponse]) error { - return connect.NewError(connect.CodeUnimplemented, errors.New("module context must be acquired from the controller")) -} - -func (s *Service) AcquireLease(context.Context, *connect.BidiStream[ftlv1.AcquireLeaseRequest, ftlv1.AcquireLeaseResponse]) error { - return connect.NewError(connect.CodeUnimplemented, errors.New("leases must be acquired from the controller")) -} - -func (s *Service) SendFSMEvent(context.Context, *connect.Request[ftlv1.SendFSMEventRequest]) (*connect.Response[ftlv1.SendFSMEventResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("FSM events must be sent to the controller")) -} - -func (s *Service) SetNextFSMEvent(context.Context, *connect.Request[ftlv1.SendFSMEventRequest]) (*connect.Response[ftlv1.SendFSMEventResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("FSM events must be set by the controller")) -} - -func (s *Service) PublishEvent(context.Context, *connect.Request[ftlv1.PublishEventRequest]) (*connect.Response[ftlv1.PublishEventResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("topic events must be sent to the controller")) -} - func (s *Service) Deploy(ctx context.Context, req *connect.Request[ftlv1.DeployRequest]) (response *connect.Response[ftlv1.DeployResponse], err error) { if err, ok := s.registrationFailure.Load().Get(); ok { observability.Deployment.Failure(ctx, optional.None[string]()) diff --git a/frontend/src/protos/xyz/block/ftl/v1/ftl_connect.ts b/frontend/src/protos/xyz/block/ftl/v1/ftl_connect.ts index 0de5b51e52..40c6c46475 100644 --- a/frontend/src/protos/xyz/block/ftl/v1/ftl_connect.ts +++ b/frontend/src/protos/xyz/block/ftl/v1/ftl_connect.ts @@ -26,10 +26,44 @@ export const VerbService = { kind: MethodKind.Unary, idempotency: MethodIdempotency.NoSideEffects, }, + /** + * Issue a synchronous call to a Verb. + * + * @generated from rpc xyz.block.ftl.v1.VerbService.Call + */ + call: { + name: "Call", + I: CallRequest, + O: CallResponse, + kind: MethodKind.Unary, + }, + } +} as const; + +/** + * ModuleService is the service that modules use to interact with the Controller. + * + * @generated from service xyz.block.ftl.v1.ModuleService + */ +export const ModuleService = { + typeName: "xyz.block.ftl.v1.ModuleService", + methods: { + /** + * Ping service for readiness. + * + * @generated from rpc xyz.block.ftl.v1.ModuleService.Ping + */ + ping: { + name: "Ping", + I: PingRequest, + O: PingResponse, + kind: MethodKind.Unary, + idempotency: MethodIdempotency.NoSideEffects, + }, /** * Get configuration state for the module * - * @generated from rpc xyz.block.ftl.v1.VerbService.GetModuleContext + * @generated from rpc xyz.block.ftl.v1.ModuleService.GetModuleContext */ getModuleContext: { name: "GetModuleContext", @@ -42,7 +76,7 @@ export const VerbService = { * * Returns ResourceExhausted if the lease is held. * - * @generated from rpc xyz.block.ftl.v1.VerbService.AcquireLease + * @generated from rpc xyz.block.ftl.v1.ModuleService.AcquireLease */ acquireLease: { name: "AcquireLease", @@ -53,7 +87,7 @@ export const VerbService = { /** * Send an event to an FSM. * - * @generated from rpc xyz.block.ftl.v1.VerbService.SendFSMEvent + * @generated from rpc xyz.block.ftl.v1.ModuleService.SendFSMEvent */ sendFSMEvent: { name: "SendFSMEvent", @@ -64,7 +98,7 @@ export const VerbService = { /** * Set the next event for an FSM. * - * @generated from rpc xyz.block.ftl.v1.VerbService.SetNextFSMEvent + * @generated from rpc xyz.block.ftl.v1.ModuleService.SetNextFSMEvent */ setNextFSMEvent: { name: "SetNextFSMEvent", @@ -75,7 +109,7 @@ export const VerbService = { /** * Publish an event to a topic. * - * @generated from rpc xyz.block.ftl.v1.VerbService.PublishEvent + * @generated from rpc xyz.block.ftl.v1.ModuleService.PublishEvent */ publishEvent: { name: "PublishEvent", @@ -83,17 +117,6 @@ export const VerbService = { O: PublishEventResponse, kind: MethodKind.Unary, }, - /** - * Issue a synchronous call to a Verb. - * - * @generated from rpc xyz.block.ftl.v1.VerbService.Call - */ - call: { - name: "Call", - I: CallRequest, - O: CallResponse, - kind: MethodKind.Unary, - }, } } as const; diff --git a/go-runtime/ftl/leases.go b/go-runtime/ftl/leases.go index c4ea39568d..344e82752c 100644 --- a/go-runtime/ftl/leases.go +++ b/go-runtime/ftl/leases.go @@ -161,7 +161,7 @@ type leaseClient struct { var _ modulecontext.LeaseClient = &leaseClient{} func (c *leaseClient) Acquire(ctx context.Context, module string, key []string, ttl time.Duration) error { - c.stream = rpc.ClientFromContext[ftlv1connect.VerbServiceClient](ctx).AcquireLease(ctx) + c.stream = rpc.ClientFromContext[ftlv1connect.ModuleServiceClient](ctx).AcquireLease(ctx) req := &ftlv1.AcquireLeaseRequest{Key: key, Module: module, Ttl: durationpb.New(ttl)} if err := c.stream.Send(req); err != nil { if connect.CodeOf(err) == connect.CodeResourceExhausted { diff --git a/go-runtime/internal/impl.go b/go-runtime/internal/impl.go index 7e12573414..58ead90c88 100644 --- a/go-runtime/internal/impl.go +++ b/go-runtime/internal/impl.go @@ -51,7 +51,7 @@ func (r *RealFTL) GetSecret(_ context.Context, name string, dest any) error { } func (r *RealFTL) FSMSend(ctx context.Context, fsm, instance string, event any) error { - client := rpc.ClientFromContext[ftlv1connect.VerbServiceClient](ctx) + client := rpc.ClientFromContext[ftlv1connect.ModuleServiceClient](ctx) body, err := encoding.Marshal(event) if err != nil { return fmt.Errorf("failed to marshal event: %w", err) @@ -69,7 +69,7 @@ func (r *RealFTL) FSMSend(ctx context.Context, fsm, instance string, event any) } func (r *RealFTL) FSMNext(ctx context.Context, fsm, instance string, event any) error { - client := rpc.ClientFromContext[ftlv1connect.VerbServiceClient](ctx) + client := rpc.ClientFromContext[ftlv1connect.ModuleServiceClient](ctx) body, err := encoding.Marshal(event) if err != nil { return fmt.Errorf("failed to marshal event: %w", err) @@ -91,7 +91,7 @@ func (r *RealFTL) PublishEvent(ctx context.Context, topic *schema.Ref, event any if topic.Module != caller.Module { return fmt.Errorf("can not publish to another module's topic: %s", topic) } - client := rpc.ClientFromContext[ftlv1connect.VerbServiceClient](ctx) + client := rpc.ClientFromContext[ftlv1connect.ModuleServiceClient](ctx) body, err := encoding.Marshal(event) if err != nil { return fmt.Errorf("failed to marshal event: %w", err) diff --git a/go-runtime/server/server.go b/go-runtime/server/server.go index eea5d5846f..19ec934944 100644 --- a/go-runtime/server/server.go +++ b/go-runtime/server/server.go @@ -33,10 +33,12 @@ type UserVerbConfig struct { // This function is intended to be used by the code generator. func NewUserVerbServer(projectName string, moduleName string, handlers ...Handler) plugin.Constructor[ftlv1connect.VerbServiceHandler, UserVerbConfig] { return func(ctx context.Context, uc UserVerbConfig) (context.Context, ftlv1connect.VerbServiceHandler, error) { + moduleServiceClient := rpc.Dial(ftlv1connect.NewModuleServiceClient, uc.FTLEndpoint.String(), log.Error) + ctx = rpc.ContextWithClient(ctx, moduleServiceClient) verbServiceClient := rpc.Dial(ftlv1connect.NewVerbServiceClient, uc.FTLEndpoint.String(), log.Error) ctx = rpc.ContextWithClient(ctx, verbServiceClient) - moduleContextSupplier := modulecontext.NewModuleContextSupplier(verbServiceClient) + moduleContextSupplier := modulecontext.NewModuleContextSupplier(moduleServiceClient) dynamicCtx, err := modulecontext.NewDynamicContext(ctx, moduleContextSupplier, moduleName) if err != nil { return nil, nil, fmt.Errorf("could not get config: %w", err) @@ -169,26 +171,6 @@ func (m *moduleServer) Call(ctx context.Context, req *connect.Request[ftlv1.Call }), nil } -func (m *moduleServer) GetModuleContext(_ context.Context, _ *connect.Request[ftlv1.ModuleContextRequest], _ *connect.ServerStream[ftlv1.ModuleContextResponse]) error { - return connect.NewError(connect.CodeUnimplemented, fmt.Errorf("GetModuleContext not implemented")) -} - -func (m *moduleServer) AcquireLease(context.Context, *connect.BidiStream[ftlv1.AcquireLeaseRequest, ftlv1.AcquireLeaseResponse]) error { - return connect.NewError(connect.CodeUnimplemented, fmt.Errorf("AcquireLease not implemented")) -} - func (m *moduleServer) Ping(_ context.Context, _ *connect.Request[ftlv1.PingRequest]) (*connect.Response[ftlv1.PingResponse], error) { return connect.NewResponse(&ftlv1.PingResponse{}), nil } - -func (m *moduleServer) SendFSMEvent(context.Context, *connect.Request[ftlv1.SendFSMEventRequest]) (*connect.Response[ftlv1.SendFSMEventResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, fmt.Errorf("SendFSMEvent not implemented")) -} - -func (m *moduleServer) SetNextFSMEvent(ctx context.Context, req *connect.Request[ftlv1.SendFSMEventRequest]) (*connect.Response[ftlv1.SendFSMEventResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, fmt.Errorf("SetNextFSMEvent not implemented")) -} - -func (m *moduleServer) PublishEvent(context.Context, *connect.Request[ftlv1.PublishEventRequest]) (*connect.Response[ftlv1.PublishEventResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, fmt.Errorf("PublishEvent not implemented")) -} diff --git a/internal/modulecontext/module_context.go b/internal/modulecontext/module_context.go index 57985929df..27938c6043 100644 --- a/internal/modulecontext/module_context.go +++ b/internal/modulecontext/module_context.go @@ -184,10 +184,10 @@ type ModuleContextSupplier interface { } type grpcModuleContextSupplier struct { - client ftlv1connect.VerbServiceClient + client ftlv1connect.ModuleServiceClient } -func NewModuleContextSupplier(client ftlv1connect.VerbServiceClient) ModuleContextSupplier { +func NewModuleContextSupplier(client ftlv1connect.ModuleServiceClient) ModuleContextSupplier { return ModuleContextSupplier(grpcModuleContextSupplier{client}) } diff --git a/jvm-runtime/ftl-runtime/common/runtime/src/main/java/xyz/block/ftl/runtime/FTLController.java b/jvm-runtime/ftl-runtime/common/runtime/src/main/java/xyz/block/ftl/runtime/FTLController.java index 94f953d205..7e7f6a33f8 100644 --- a/jvm-runtime/ftl-runtime/common/runtime/src/main/java/xyz/block/ftl/runtime/FTLController.java +++ b/jvm-runtime/ftl-runtime/common/runtime/src/main/java/xyz/block/ftl/runtime/FTLController.java @@ -19,15 +19,7 @@ import xyz.block.ftl.LeaseClient; import xyz.block.ftl.LeaseFailedException; import xyz.block.ftl.LeaseHandle; -import xyz.block.ftl.v1.AcquireLeaseRequest; -import xyz.block.ftl.v1.AcquireLeaseResponse; -import xyz.block.ftl.v1.CallRequest; -import xyz.block.ftl.v1.CallResponse; -import xyz.block.ftl.v1.ModuleContextRequest; -import xyz.block.ftl.v1.ModuleContextResponse; -import xyz.block.ftl.v1.PublishEventRequest; -import xyz.block.ftl.v1.PublishEventResponse; -import xyz.block.ftl.v1.VerbServiceGrpc; +import xyz.block.ftl.v1.*; import xyz.block.ftl.v1.schema.Ref; public class FTLController implements LeaseClient { @@ -39,6 +31,7 @@ public class FTLController implements LeaseClient { private boolean waiters = false; final VerbServiceGrpc.VerbServiceStub verbService; + final ModuleServiceGrpc.ModuleServiceStub moduleService; final StreamObserver moduleObserver = new ModuleObserver(); private static volatile FTLController controller; @@ -73,8 +66,9 @@ public static FTLController instance() { channelBuilder.usePlaintext(); } var channel = channelBuilder.build(); + moduleService = ModuleServiceGrpc.newStub(channel); + moduleService.getModuleContext(ModuleContextRequest.newBuilder().setModule(moduleName).build(), moduleObserver); verbService = VerbServiceGrpc.newStub(channel); - verbService.getModuleContext(ModuleContextRequest.newBuilder().setModule(moduleName).build(), moduleObserver); } public byte[] getSecret(String secretName) { @@ -138,7 +132,7 @@ public void onCompleted() { public void publishEvent(String topic, String callingVerbName, byte[] event) { CompletableFuture cf = new CompletableFuture<>(); - verbService.publishEvent(PublishEventRequest.newBuilder() + moduleService.publishEvent(PublishEventRequest.newBuilder() .setCaller(callingVerbName).setBody(ByteString.copyFrom(event)) .setTopic(Ref.newBuilder().setModule(moduleName).setName(topic).build()).build(), new StreamObserver() { @@ -166,7 +160,7 @@ public void onCompleted() { public LeaseHandle acquireLease(Duration duration, String... keys) throws LeaseFailedException { CompletableFuture cf = new CompletableFuture<>(); - var client = verbService.acquireLease(new StreamObserver() { + var client = moduleService.acquireLease(new StreamObserver() { @Override public void onNext(AcquireLeaseResponse value) { cf.complete(null); @@ -255,7 +249,7 @@ public void onError(Throwable throwable) { } } if (failCount.incrementAndGet() < 5) { - verbService.getModuleContext(ModuleContextRequest.newBuilder().setModule(moduleName).build(), moduleObserver); + moduleService.getModuleContext(ModuleContextRequest.newBuilder().setModule(moduleName).build(), moduleObserver); } } diff --git a/jvm-runtime/ftl-runtime/common/runtime/src/main/java/xyz/block/ftl/runtime/VerbHandler.java b/jvm-runtime/ftl-runtime/common/runtime/src/main/java/xyz/block/ftl/runtime/VerbHandler.java index 8d5103c2ad..50f6fac6f1 100644 --- a/jvm-runtime/ftl-runtime/common/runtime/src/main/java/xyz/block/ftl/runtime/VerbHandler.java +++ b/jvm-runtime/ftl-runtime/common/runtime/src/main/java/xyz/block/ftl/runtime/VerbHandler.java @@ -27,26 +27,6 @@ public void call(CallRequest request, StreamObserver responseObser } } - @Override - public void publishEvent(PublishEventRequest request, StreamObserver responseObserver) { - super.publishEvent(request, responseObserver); - } - - @Override - public void sendFSMEvent(SendFSMEventRequest request, StreamObserver responseObserver) { - super.sendFSMEvent(request, responseObserver); - } - - @Override - public StreamObserver acquireLease(StreamObserver responseObserver) { - return super.acquireLease(responseObserver); - } - - @Override - public void getModuleContext(ModuleContextRequest request, StreamObserver responseObserver) { - super.getModuleContext(request, responseObserver); - } - @Override public void ping(PingRequest request, StreamObserver responseObserver) { responseObserver.onNext(PingResponse.newBuilder().build()); diff --git a/jvm-runtime/ftl-runtime/test-framework/src/main/java/xyz/block/ftl/java/test/internal/FTLTestServer.java b/jvm-runtime/ftl-runtime/test-framework/src/main/java/xyz/block/ftl/java/test/internal/FTLTestServer.java index 163a3ccad6..f1527faa03 100644 --- a/jvm-runtime/ftl-runtime/test-framework/src/main/java/xyz/block/ftl/java/test/internal/FTLTestServer.java +++ b/jvm-runtime/ftl-runtime/test-framework/src/main/java/xyz/block/ftl/java/test/internal/FTLTestServer.java @@ -15,6 +15,7 @@ public void start() { var addr = new InetSocketAddress("127.0.0.1", 0); grpcServer = NettyServerBuilder.forAddress(addr) .addService(new TestVerbServer()) + .addService(new TestModuleServer()) .build(); try { grpcServer.start(); diff --git a/jvm-runtime/ftl-runtime/test-framework/src/main/java/xyz/block/ftl/java/test/internal/TestModuleServer.java b/jvm-runtime/ftl-runtime/test-framework/src/main/java/xyz/block/ftl/java/test/internal/TestModuleServer.java new file mode 100644 index 0000000000..3b6df063af --- /dev/null +++ b/jvm-runtime/ftl-runtime/test-framework/src/main/java/xyz/block/ftl/java/test/internal/TestModuleServer.java @@ -0,0 +1,37 @@ +package xyz.block.ftl.java.test.internal; + +import io.grpc.stub.StreamObserver; +import xyz.block.ftl.v1.*; + +public class TestModuleServer extends ModuleServiceGrpc.ModuleServiceImplBase { + @Override + public void ping(PingRequest request, StreamObserver responseObserver) { + responseObserver.onNext(PingResponse.newBuilder().build()); + responseObserver.onCompleted(); + } + + @Override + public void getModuleContext(ModuleContextRequest request, StreamObserver responseObserver) { + super.getModuleContext(request, responseObserver); + } + + @Override + public StreamObserver acquireLease(StreamObserver responseObserver) { + return super.acquireLease(responseObserver); + } + + @Override + public void sendFSMEvent(SendFSMEventRequest request, StreamObserver responseObserver) { + super.sendFSMEvent(request, responseObserver); + } + + @Override + public void setNextFSMEvent(SendFSMEventRequest request, StreamObserver responseObserver) { + super.setNextFSMEvent(request, responseObserver); + } + + @Override + public void publishEvent(PublishEventRequest request, StreamObserver responseObserver) { + super.publishEvent(request, responseObserver); + } +} diff --git a/jvm-runtime/ftl-runtime/test-framework/src/main/java/xyz/block/ftl/java/test/internal/TestVerbServer.java b/jvm-runtime/ftl-runtime/test-framework/src/main/java/xyz/block/ftl/java/test/internal/TestVerbServer.java index bd46c97b0c..d89d8e0e1a 100644 --- a/jvm-runtime/ftl-runtime/test-framework/src/main/java/xyz/block/ftl/java/test/internal/TestVerbServer.java +++ b/jvm-runtime/ftl-runtime/test-framework/src/main/java/xyz/block/ftl/java/test/internal/TestVerbServer.java @@ -1,7 +1,6 @@ package xyz.block.ftl.java.test.internal; import java.io.IOException; -import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; import java.util.function.Function; @@ -12,18 +11,10 @@ import io.grpc.ManagedChannelBuilder; import io.grpc.stub.StreamObserver; import io.quarkus.arc.Arc; -import xyz.block.ftl.v1.AcquireLeaseRequest; -import xyz.block.ftl.v1.AcquireLeaseResponse; import xyz.block.ftl.v1.CallRequest; import xyz.block.ftl.v1.CallResponse; -import xyz.block.ftl.v1.ModuleContextRequest; -import xyz.block.ftl.v1.ModuleContextResponse; import xyz.block.ftl.v1.PingRequest; import xyz.block.ftl.v1.PingResponse; -import xyz.block.ftl.v1.PublishEventRequest; -import xyz.block.ftl.v1.PublishEventResponse; -import xyz.block.ftl.v1.SendFSMEventRequest; -import xyz.block.ftl.v1.SendFSMEventResponse; import xyz.block.ftl.v1.VerbServiceGrpc; public class TestVerbServer extends VerbServiceGrpc.VerbServiceImplBase { @@ -73,27 +64,6 @@ public void call(CallRequest request, StreamObserver responseObser verbService.call(request, responseObserver); } - @Override - public void publishEvent(PublishEventRequest request, StreamObserver responseObserver) { - super.publishEvent(request, responseObserver); - } - - @Override - public void sendFSMEvent(SendFSMEventRequest request, StreamObserver responseObserver) { - super.sendFSMEvent(request, responseObserver); - } - - @Override - public StreamObserver acquireLease(StreamObserver responseObserver) { - return super.acquireLease(responseObserver); - } - - @Override - public void getModuleContext(ModuleContextRequest request, StreamObserver responseObserver) { - responseObserver.onNext(ModuleContextResponse.newBuilder().setModule("test") - .putConfigs("test", ByteString.copyFrom("test", StandardCharsets.UTF_8)).build()); - } - @Override public void ping(PingRequest request, StreamObserver responseObserver) { responseObserver.onNext(PingResponse.newBuilder().build());