From dbe347387458e67b49af9dbbd14bc18c21bfbe82 Mon Sep 17 00:00:00 2001 From: Todd Date: Mon, 17 Apr 2023 15:20:09 -0700 Subject: [PATCH] Add CreateChannel enum for upstream message handler --- .../upstream_message_service_worker.go | 2 + .../services/upstream_message_service.pb.go | 40 ++++++++++--------- .../v1/upstream_message_service.proto | 1 + 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/internal/daemon/cluster/handlers/upstream_message_service_worker.go b/internal/daemon/cluster/handlers/upstream_message_service_worker.go index 3b8c8be2f1..19ed4a308d 100644 --- a/internal/daemon/cluster/handlers/upstream_message_service_worker.go +++ b/internal/daemon/cluster/handlers/upstream_message_service_worker.go @@ -227,6 +227,8 @@ func toMsgType(ctx context.Context, m proto.Message) (pbs.MsgType, error) { return pbs.MsgType_MSG_TYPE_VERIFY_SIGNATURE, nil case *pbs.CloseConnectionRecordingRequest, *pbs.CloseConnectionRecordingResponse: return pbs.MsgType_MSG_TYPE_CLOSE_CONNECTION, nil + case *pbs.CreateChannelRecordingRequest, *pbs.CreateChannelRecordingResponse: + return pbs.MsgType_MSG_TYPE_CREATE_CHANNEL, nil default: return pbs.MsgType_MSG_TYPE_UNSPECIFIED, errors.New(ctx, errors.InvalidParameter, op, fmt.Sprintf("%q is an unknown msg type", t)) } diff --git a/internal/gen/controller/servers/services/upstream_message_service.pb.go b/internal/gen/controller/servers/services/upstream_message_service.pb.go index dd51d742bb..47f0753bab 100644 --- a/internal/gen/controller/servers/services/upstream_message_service.pb.go +++ b/internal/gen/controller/servers/services/upstream_message_service.pb.go @@ -31,6 +31,7 @@ const ( MsgType_MSG_TYPE_UNWRAP_KEYS MsgType = 2 MsgType_MSG_TYPE_VERIFY_SIGNATURE MsgType = 3 MsgType_MSG_TYPE_CLOSE_CONNECTION MsgType = 4 + MsgType_MSG_TYPE_CREATE_CHANNEL MsgType = 5 ) // Enum value maps for MsgType. @@ -41,6 +42,7 @@ var ( 2: "MSG_TYPE_UNWRAP_KEYS", 3: "MSG_TYPE_VERIFY_SIGNATURE", 4: "MSG_TYPE_CLOSE_CONNECTION", + 5: "MSG_TYPE_CREATE_CHANNEL", } MsgType_value = map[string]int32{ "MSG_TYPE_UNSPECIFIED": 0, @@ -48,6 +50,7 @@ var ( "MSG_TYPE_UNWRAP_KEYS": 2, "MSG_TYPE_VERIFY_SIGNATURE": 3, "MSG_TYPE_CLOSE_CONNECTION": 4, + "MSG_TYPE_CREATE_CHANNEL": 5, } ) @@ -399,7 +402,7 @@ var file_controller_servers_services_v1_upstream_message_service_proto_rawDesc = 0x73, 0x67, 0x22, 0x2f, 0x0a, 0x1b, 0x45, 0x63, 0x68, 0x6f, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6d, 0x73, 0x67, 0x2a, 0x8e, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x6d, 0x73, 0x67, 0x2a, 0xab, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4d, 0x53, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4d, 0x53, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x43, 0x48, 0x4f, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, @@ -408,23 +411,24 @@ var file_controller_servers_services_v1_upstream_message_service_proto_rawDesc = 0x50, 0x45, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x54, 0x55, 0x52, 0x45, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x4d, 0x53, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, - 0x4f, 0x4e, 0x10, 0x04, 0x32, 0x9f, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x84, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x36, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x51, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x4f, 0x4e, 0x10, 0x04, 0x12, 0x1b, 0x0a, 0x17, 0x4d, 0x53, 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x10, + 0x05, 0x32, 0x9f, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x84, 0x01, 0x0a, + 0x0f, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x36, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x42, 0x51, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x62, 0x6f, 0x75, 0x6e, + 0x64, 0x61, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, + 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x3b, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/internal/proto/controller/servers/services/v1/upstream_message_service.proto b/internal/proto/controller/servers/services/v1/upstream_message_service.proto index cea54705bf..ccacbe640c 100644 --- a/internal/proto/controller/servers/services/v1/upstream_message_service.proto +++ b/internal/proto/controller/servers/services/v1/upstream_message_service.proto @@ -53,6 +53,7 @@ enum MsgType { MSG_TYPE_UNWRAP_KEYS = 2; MSG_TYPE_VERIFY_SIGNATURE = 3; MSG_TYPE_CLOSE_CONNECTION = 4; + MSG_TYPE_CREATE_CHANNEL = 5; } message EchoUpstreamMessageRequest {