From 39d9d86d6d8b64f8ca6c92f1a5bf53e5a11995c4 Mon Sep 17 00:00:00 2001 From: Antoine Grondin Date: Tue, 2 Sep 2025 17:12:15 +0900 Subject: [PATCH] ping a stream that stays open until the cli is gone --- .../v1/localhostv1connect/service.connect.go | 45 +++++++++++++++---- go/svc/localhost/v1/service.pb.go | 42 +++++++++-------- js/svc/localhost/v1/service_pb.ts | 10 ++++- proto/svc/localhost/v1/service.proto | 1 + 4 files changed, 70 insertions(+), 28 deletions(-) diff --git a/go/svc/localhost/v1/localhostv1connect/service.connect.go b/go/svc/localhost/v1/localhostv1connect/service.connect.go index e42c08f..8cf8b04 100644 --- a/go/svc/localhost/v1/localhostv1connect/service.connect.go +++ b/go/svc/localhost/v1/localhostv1connect/service.connect.go @@ -35,6 +35,9 @@ const ( const ( // LocalhostServicePingProcedure is the fully-qualified name of the LocalhostService's Ping RPC. LocalhostServicePingProcedure = "/svc.localhost.v1.LocalhostService/Ping" + // LocalhostServicePingStreamProcedure is the fully-qualified name of the LocalhostService's + // PingStream RPC. + LocalhostServicePingStreamProcedure = "/svc.localhost.v1.LocalhostService/PingStream" // LocalhostServiceDoLoginProcedure is the fully-qualified name of the LocalhostService's DoLogin // RPC. LocalhostServiceDoLoginProcedure = "/svc.localhost.v1.LocalhostService/DoLogin" @@ -61,6 +64,7 @@ const ( // LocalhostServiceClient is a client for the svc.localhost.v1.LocalhostService service. type LocalhostServiceClient interface { Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) + PingStream(context.Context, *connect.Request[v1.PingRequest]) (*connect.ServerStreamForClient[v1.PingResponse], error) DoLogin(context.Context, *connect.Request[v1.DoLoginRequest]) (*connect.Response[v1.DoLoginResponse], error) DoLogout(context.Context, *connect.Request[v1.DoLogoutRequest]) (*connect.Response[v1.DoLogoutResponse], error) DoUpdate(context.Context, *connect.Request[v1.DoUpdateRequest]) (*connect.Response[v1.DoUpdateResponse], error) @@ -87,6 +91,12 @@ func NewLocalhostServiceClient(httpClient connect.HTTPClient, baseURL string, op connect.WithSchema(localhostServiceMethods.ByName("Ping")), connect.WithClientOptions(opts...), ), + pingStream: connect.NewClient[v1.PingRequest, v1.PingResponse]( + httpClient, + baseURL+LocalhostServicePingStreamProcedure, + connect.WithSchema(localhostServiceMethods.ByName("PingStream")), + connect.WithClientOptions(opts...), + ), doLogin: connect.NewClient[v1.DoLoginRequest, v1.DoLoginResponse]( httpClient, baseURL+LocalhostServiceDoLoginProcedure, @@ -134,14 +144,15 @@ func NewLocalhostServiceClient(httpClient connect.HTTPClient, baseURL string, op // localhostServiceClient implements LocalhostServiceClient. type localhostServiceClient struct { - ping *connect.Client[v1.PingRequest, v1.PingResponse] - doLogin *connect.Client[v1.DoLoginRequest, v1.DoLoginResponse] - doLogout *connect.Client[v1.DoLogoutRequest, v1.DoLogoutResponse] - doUpdate *connect.Client[v1.DoUpdateRequest, v1.DoUpdateResponse] - doRestart *connect.Client[v1.DoRestartRequest, v1.DoRestartResponse] - getConfig *connect.Client[v1.GetConfigRequest, v1.GetConfigResponse] - setConfig *connect.Client[v1.SetConfigRequest, v1.SetConfigResponse] - getStats *connect.Client[v1.GetStatsRequest, v1.GetStatsResponse] + ping *connect.Client[v1.PingRequest, v1.PingResponse] + pingStream *connect.Client[v1.PingRequest, v1.PingResponse] + doLogin *connect.Client[v1.DoLoginRequest, v1.DoLoginResponse] + doLogout *connect.Client[v1.DoLogoutRequest, v1.DoLogoutResponse] + doUpdate *connect.Client[v1.DoUpdateRequest, v1.DoUpdateResponse] + doRestart *connect.Client[v1.DoRestartRequest, v1.DoRestartResponse] + getConfig *connect.Client[v1.GetConfigRequest, v1.GetConfigResponse] + setConfig *connect.Client[v1.SetConfigRequest, v1.SetConfigResponse] + getStats *connect.Client[v1.GetStatsRequest, v1.GetStatsResponse] } // Ping calls svc.localhost.v1.LocalhostService.Ping. @@ -149,6 +160,11 @@ func (c *localhostServiceClient) Ping(ctx context.Context, req *connect.Request[ return c.ping.CallUnary(ctx, req) } +// PingStream calls svc.localhost.v1.LocalhostService.PingStream. +func (c *localhostServiceClient) PingStream(ctx context.Context, req *connect.Request[v1.PingRequest]) (*connect.ServerStreamForClient[v1.PingResponse], error) { + return c.pingStream.CallServerStream(ctx, req) +} + // DoLogin calls svc.localhost.v1.LocalhostService.DoLogin. func (c *localhostServiceClient) DoLogin(ctx context.Context, req *connect.Request[v1.DoLoginRequest]) (*connect.Response[v1.DoLoginResponse], error) { return c.doLogin.CallUnary(ctx, req) @@ -187,6 +203,7 @@ func (c *localhostServiceClient) GetStats(ctx context.Context, req *connect.Requ // LocalhostServiceHandler is an implementation of the svc.localhost.v1.LocalhostService service. type LocalhostServiceHandler interface { Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) + PingStream(context.Context, *connect.Request[v1.PingRequest], *connect.ServerStream[v1.PingResponse]) error DoLogin(context.Context, *connect.Request[v1.DoLoginRequest]) (*connect.Response[v1.DoLoginResponse], error) DoLogout(context.Context, *connect.Request[v1.DoLogoutRequest]) (*connect.Response[v1.DoLogoutResponse], error) DoUpdate(context.Context, *connect.Request[v1.DoUpdateRequest]) (*connect.Response[v1.DoUpdateResponse], error) @@ -209,6 +226,12 @@ func NewLocalhostServiceHandler(svc LocalhostServiceHandler, opts ...connect.Han connect.WithSchema(localhostServiceMethods.ByName("Ping")), connect.WithHandlerOptions(opts...), ) + localhostServicePingStreamHandler := connect.NewServerStreamHandler( + LocalhostServicePingStreamProcedure, + svc.PingStream, + connect.WithSchema(localhostServiceMethods.ByName("PingStream")), + connect.WithHandlerOptions(opts...), + ) localhostServiceDoLoginHandler := connect.NewUnaryHandler( LocalhostServiceDoLoginProcedure, svc.DoLogin, @@ -255,6 +278,8 @@ func NewLocalhostServiceHandler(svc LocalhostServiceHandler, opts ...connect.Han switch r.URL.Path { case LocalhostServicePingProcedure: localhostServicePingHandler.ServeHTTP(w, r) + case LocalhostServicePingStreamProcedure: + localhostServicePingStreamHandler.ServeHTTP(w, r) case LocalhostServiceDoLoginProcedure: localhostServiceDoLoginHandler.ServeHTTP(w, r) case LocalhostServiceDoLogoutProcedure: @@ -282,6 +307,10 @@ func (UnimplementedLocalhostServiceHandler) Ping(context.Context, *connect.Reque return nil, connect.NewError(connect.CodeUnimplemented, errors.New("svc.localhost.v1.LocalhostService.Ping is not implemented")) } +func (UnimplementedLocalhostServiceHandler) PingStream(context.Context, *connect.Request[v1.PingRequest], *connect.ServerStream[v1.PingResponse]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("svc.localhost.v1.LocalhostService.PingStream is not implemented")) +} + func (UnimplementedLocalhostServiceHandler) DoLogin(context.Context, *connect.Request[v1.DoLoginRequest]) (*connect.Response[v1.DoLoginResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("svc.localhost.v1.LocalhostService.DoLogin is not implemented")) } diff --git a/go/svc/localhost/v1/service.pb.go b/go/svc/localhost/v1/service.pb.go index 85993e7..b5832e9 100644 --- a/go/svc/localhost/v1/service.pb.go +++ b/go/svc/localhost/v1/service.pb.go @@ -776,9 +776,11 @@ const file_svc_localhost_v1_service_proto_rawDesc = "" + "\x11SetConfigResponse\"\x11\n" + "\x0fGetStatsRequest\"R\n" + "\x10GetStatsResponse\x12>\n" + - "\x0edatabase_stats\x18\x01 \x01(\v2\x17.types.v1.DatabaseStatsR\rdatabaseStats2\xa4\x05\n" + + "\x0edatabase_stats\x18\x01 \x01(\v2\x17.types.v1.DatabaseStatsR\rdatabaseStats2\xf3\x05\n" + "\x10LocalhostService\x12E\n" + - "\x04Ping\x12\x1d.svc.localhost.v1.PingRequest\x1a\x1e.svc.localhost.v1.PingResponse\x12N\n" + + "\x04Ping\x12\x1d.svc.localhost.v1.PingRequest\x1a\x1e.svc.localhost.v1.PingResponse\x12M\n" + + "\n" + + "PingStream\x12\x1d.svc.localhost.v1.PingRequest\x1a\x1e.svc.localhost.v1.PingResponse0\x01\x12N\n" + "\aDoLogin\x12 .svc.localhost.v1.DoLoginRequest\x1a!.svc.localhost.v1.DoLoginResponse\x12Q\n" + "\bDoLogout\x12!.svc.localhost.v1.DoLogoutRequest\x1a\".svc.localhost.v1.DoLogoutResponse\x12Q\n" + "\bDoUpdate\x12!.svc.localhost.v1.DoUpdateRequest\x1a\".svc.localhost.v1.DoUpdateResponse\x12T\n" + @@ -837,23 +839,25 @@ var file_svc_localhost_v1_service_proto_depIdxs = []int32{ 22, // 7: svc.localhost.v1.PingResponse.UserDetails.current_organization:type_name -> types.v1.Organization 22, // 8: svc.localhost.v1.PingResponse.UserDetails.default_organization:type_name -> types.v1.Organization 0, // 9: svc.localhost.v1.LocalhostService.Ping:input_type -> svc.localhost.v1.PingRequest - 2, // 10: svc.localhost.v1.LocalhostService.DoLogin:input_type -> svc.localhost.v1.DoLoginRequest - 4, // 11: svc.localhost.v1.LocalhostService.DoLogout:input_type -> svc.localhost.v1.DoLogoutRequest - 6, // 12: svc.localhost.v1.LocalhostService.DoUpdate:input_type -> svc.localhost.v1.DoUpdateRequest - 8, // 13: svc.localhost.v1.LocalhostService.DoRestart:input_type -> svc.localhost.v1.DoRestartRequest - 10, // 14: svc.localhost.v1.LocalhostService.GetConfig:input_type -> svc.localhost.v1.GetConfigRequest - 12, // 15: svc.localhost.v1.LocalhostService.SetConfig:input_type -> svc.localhost.v1.SetConfigRequest - 14, // 16: svc.localhost.v1.LocalhostService.GetStats:input_type -> svc.localhost.v1.GetStatsRequest - 1, // 17: svc.localhost.v1.LocalhostService.Ping:output_type -> svc.localhost.v1.PingResponse - 3, // 18: svc.localhost.v1.LocalhostService.DoLogin:output_type -> svc.localhost.v1.DoLoginResponse - 5, // 19: svc.localhost.v1.LocalhostService.DoLogout:output_type -> svc.localhost.v1.DoLogoutResponse - 7, // 20: svc.localhost.v1.LocalhostService.DoUpdate:output_type -> svc.localhost.v1.DoUpdateResponse - 9, // 21: svc.localhost.v1.LocalhostService.DoRestart:output_type -> svc.localhost.v1.DoRestartResponse - 11, // 22: svc.localhost.v1.LocalhostService.GetConfig:output_type -> svc.localhost.v1.GetConfigResponse - 13, // 23: svc.localhost.v1.LocalhostService.SetConfig:output_type -> svc.localhost.v1.SetConfigResponse - 15, // 24: svc.localhost.v1.LocalhostService.GetStats:output_type -> svc.localhost.v1.GetStatsResponse - 17, // [17:25] is the sub-list for method output_type - 9, // [9:17] is the sub-list for method input_type + 0, // 10: svc.localhost.v1.LocalhostService.PingStream:input_type -> svc.localhost.v1.PingRequest + 2, // 11: svc.localhost.v1.LocalhostService.DoLogin:input_type -> svc.localhost.v1.DoLoginRequest + 4, // 12: svc.localhost.v1.LocalhostService.DoLogout:input_type -> svc.localhost.v1.DoLogoutRequest + 6, // 13: svc.localhost.v1.LocalhostService.DoUpdate:input_type -> svc.localhost.v1.DoUpdateRequest + 8, // 14: svc.localhost.v1.LocalhostService.DoRestart:input_type -> svc.localhost.v1.DoRestartRequest + 10, // 15: svc.localhost.v1.LocalhostService.GetConfig:input_type -> svc.localhost.v1.GetConfigRequest + 12, // 16: svc.localhost.v1.LocalhostService.SetConfig:input_type -> svc.localhost.v1.SetConfigRequest + 14, // 17: svc.localhost.v1.LocalhostService.GetStats:input_type -> svc.localhost.v1.GetStatsRequest + 1, // 18: svc.localhost.v1.LocalhostService.Ping:output_type -> svc.localhost.v1.PingResponse + 1, // 19: svc.localhost.v1.LocalhostService.PingStream:output_type -> svc.localhost.v1.PingResponse + 3, // 20: svc.localhost.v1.LocalhostService.DoLogin:output_type -> svc.localhost.v1.DoLoginResponse + 5, // 21: svc.localhost.v1.LocalhostService.DoLogout:output_type -> svc.localhost.v1.DoLogoutResponse + 7, // 22: svc.localhost.v1.LocalhostService.DoUpdate:output_type -> svc.localhost.v1.DoUpdateResponse + 9, // 23: svc.localhost.v1.LocalhostService.DoRestart:output_type -> svc.localhost.v1.DoRestartResponse + 11, // 24: svc.localhost.v1.LocalhostService.GetConfig:output_type -> svc.localhost.v1.GetConfigResponse + 13, // 25: svc.localhost.v1.LocalhostService.SetConfig:output_type -> svc.localhost.v1.SetConfigResponse + 15, // 26: svc.localhost.v1.LocalhostService.GetStats:output_type -> svc.localhost.v1.GetStatsResponse + 18, // [18:27] is the sub-list for method output_type + 9, // [9:18] is the sub-list for method input_type 9, // [9:9] is the sub-list for extension type_name 9, // [9:9] is the sub-list for extension extendee 0, // [0:9] is the sub-list for field type_name diff --git a/js/svc/localhost/v1/service_pb.ts b/js/svc/localhost/v1/service_pb.ts index 07f864b..f700eb2 100644 --- a/js/svc/localhost/v1/service_pb.ts +++ b/js/svc/localhost/v1/service_pb.ts @@ -24,7 +24,7 @@ import type { Message } from "@bufbuild/protobuf"; * Describes the file svc/localhost/v1/service.proto. */ export const file_svc_localhost_v1_service: GenFile = /*@__PURE__*/ - fileDesc("Ch5zdmMvbG9jYWxob3N0L3YxL3NlcnZpY2UucHJvdG8SEHN2Yy5sb2NhbGhvc3QudjEiDQoLUGluZ1JlcXVlc3Qi6QIKDFBpbmdSZXNwb25zZRIpCg5jbGllbnRfdmVyc2lvbhgBIAEoCzIRLnR5cGVzLnYxLlZlcnNpb24SFAoMYXJjaGl0ZWN0dXJlGAIgASgJEhgKEG9wZXJhdGluZ19zeXN0ZW0YAyABKAkSQgoObG9nZ2VkX2luX3VzZXIYBCABKAsyKi5zdmMubG9jYWxob3N0LnYxLlBpbmdSZXNwb25zZS5Vc2VyRGV0YWlscxIgCgRtZXRhGOgHIAEoCzIRLnR5cGVzLnYxLlJlc01ldGEalwEKC1VzZXJEZXRhaWxzEhwKBHVzZXIYASABKAsyDi50eXBlcy52MS5Vc2VyEjQKFGN1cnJlbnRfb3JnYW5pemF0aW9uGAIgASgLMhYudHlwZXMudjEuT3JnYW5pemF0aW9uEjQKFGRlZmF1bHRfb3JnYW5pemF0aW9uGAMgASgLMhYudHlwZXMudjEuT3JnYW5pemF0aW9uIiUKDkRvTG9naW5SZXF1ZXN0EhMKC3JldHVyblRvVVJMGAEgASgJIhEKD0RvTG9naW5SZXNwb25zZSImCg9Eb0xvZ291dFJlcXVlc3QSEwoLcmV0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VzcG9uc2USVAoJR2V0Q29uZmlnEiIuc3ZjLmxvY2FsaG9zdC52MS5HZXRDb25maWdSZXF1ZXN0GiMuc3ZjLmxvY2FsaG9zdC52MS5HZXRDb25maWdSZXNwb25zZRJUCglTZXRDb25maWcSIi5zdmMubG9jYWxob3N0LnYxLlNldENvbmZpZ1JlcXVlc3QaIy5zdmMubG9jYWxob3N0LnYxLlNldENvbmZpZ1Jlc3BvbnNlElEKCEdldFN0YXRzEiEuc3ZjLmxvY2FsaG9zdC52MS5HZXRTdGF0c1JlcXVlc3QaIi5zdmMubG9jYWxob3N0LnYxLkdldFN0YXRzUmVzcG9uc2VCwQEKFGNvbS5zdmMubG9jYWxob3N0LnYxQgxTZXJ2aWNlUHJvdG9QAVo5Z2l0aHViLmNvbS9odW1hbmxvZ2lvL2FwaS9nby9zdmMvbG9jYWxob3N0L3YxO2xvY2FsaG9zdHYxogIDU0xYqgIQU3ZjLkxvY2FsaG9zdC5WMcoCEFN2Y1xMb2NhbGhvc3RcVjHiAhxTdmNcTG9jYWxob3N0XFYxXEdQQk1ldGFkYXRh6gISU3ZjOjpMb2NhbGhvc3Q6OlYxYgZwcm90bzM", [file_google_protobuf_timestamp, file_types_v1_database, file_types_v1_localhost_config, file_types_v1_meta, file_types_v1_organization, file_types_v1_types, file_types_v1_user, file_types_v1_version]); + fileDesc("Ch5zdmMvbG9jYWxob3N0L3YxL3NlcnZpY2UucHJvdG8SEHN2Yy5sb2NhbGhvc3QudjEiDQoLUGluZ1JlcXVlc3Qi6QIKDFBpbmdSZXNwb25zZRIpCg5jbGllbnRfdmVyc2lvbhgBIAEoCzIRLnR5cGVzLnYxLlZlcnNpb24SFAoMYXJjaGl0ZWN0dXJlGAIgASgJEhgKEG9wZXJhdGluZ19zeXN0ZW0YAyABKAkSQgoObG9nZ2VkX2luX3VzZXIYBCABKAsyKi5zdmMubG9jYWxob3N0LnYxLlBpbmdSZXNwb25zZS5Vc2VyRGV0YWlscxIgCgRtZXRhGOgHIAEo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_google_protobuf_timestamp, file_types_v1_database, file_types_v1_localhost_config, file_types_v1_meta, file_types_v1_organization, file_types_v1_types, file_types_v1_user, file_types_v1_version]); /** * @generated from message svc.localhost.v1.PingRequest @@ -321,6 +321,14 @@ export const LocalhostService: GenService<{ input: typeof PingRequestSchema; output: typeof PingResponseSchema; }, + /** + * @generated from rpc svc.localhost.v1.LocalhostService.PingStream + */ + pingStream: { + methodKind: "server_streaming"; + input: typeof PingRequestSchema; + output: typeof PingResponseSchema; + }, /** * @generated from rpc svc.localhost.v1.LocalhostService.DoLogin */ diff --git a/proto/svc/localhost/v1/service.proto b/proto/svc/localhost/v1/service.proto index ece695a..0088ec8 100644 --- a/proto/svc/localhost/v1/service.proto +++ b/proto/svc/localhost/v1/service.proto @@ -15,6 +15,7 @@ option go_package = "svc/localhost/v1;localhostv1"; service LocalhostService { rpc Ping(PingRequest) returns (PingResponse); + rpc PingStream(PingRequest) returns (stream PingResponse); rpc DoLogin(DoLoginRequest) returns (DoLoginResponse); rpc DoLogout(DoLogoutRequest) returns (DoLogoutResponse); rpc DoUpdate(DoUpdateRequest) returns (DoUpdateResponse);