diff --git a/connector/connector.pb.go b/connector/connector.pb.go index 6170b5f..55a848a 100644 --- a/connector/connector.pb.go +++ b/connector/connector.pb.go @@ -101,6 +101,7 @@ type ControlStreamRequest struct { // *ControlStreamRequest_DiscoveryDetails // *ControlStreamRequest_AuthorizePeer // *ControlStreamRequest_Session + // *ControlStreamRequest_Stats RequestType isControlStreamRequest_RequestType `protobuf_oneof:"RequestType"` } @@ -248,6 +249,13 @@ func (x *ControlStreamRequest) GetSession() *SessionRequest { return nil } +func (x *ControlStreamRequest) GetStats() *common.StatsMessage { + if x, ok := x.GetRequestType().(*ControlStreamRequest_Stats); ok { + return x.Stats + } + return nil +} + type isControlStreamRequest_RequestType interface { isControlStreamRequest_RequestType() } @@ -312,6 +320,10 @@ type ControlStreamRequest_Session struct { Session *SessionRequest `protobuf:"bytes,16,opt,name=session,proto3,oneof"` } +type ControlStreamRequest_Stats struct { + Stats *common.StatsMessage `protobuf:"bytes,17,opt,name=stats,proto3,oneof"` +} + func (*ControlStreamRequest_Config) isControlStreamRequest_RequestType() {} func (*ControlStreamRequest_Heartbeat) isControlStreamRequest_RequestType() {} @@ -342,6 +354,8 @@ func (*ControlStreamRequest_AuthorizePeer) isControlStreamRequest_RequestType() func (*ControlStreamRequest_Session) isControlStreamRequest_RequestType() {} +func (*ControlStreamRequest_Stats) isControlStreamRequest_RequestType() {} + type ControlStreamResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -364,7 +378,6 @@ type ControlStreamResponse struct { // *ControlStreamResponse_PeerOnline // *ControlStreamResponse_PeerOffline // *ControlStreamResponse_Session - // *ControlStreamResponse_Stats RequestType isControlStreamResponse_RequestType `protobuf_oneof:"RequestType"` } @@ -512,13 +525,6 @@ func (x *ControlStreamResponse) GetSession() *SessionResponse { return nil } -func (x *ControlStreamResponse) GetStats() *common.StatsMessage { - if x, ok := x.GetRequestType().(*ControlStreamResponse_Stats); ok { - return x.Stats - } - return nil -} - type isControlStreamResponse_RequestType interface { isControlStreamResponse_RequestType() } @@ -583,10 +589,6 @@ type ControlStreamResponse_Session struct { Session *SessionResponse `protobuf:"bytes,16,opt,name=session,proto3,oneof"` } -type ControlStreamResponse_Stats struct { - Stats *common.StatsMessage `protobuf:"bytes,17,opt,name=stats,proto3,oneof"` -} - func (*ControlStreamResponse_Init) isControlStreamResponse_RequestType() {} func (*ControlStreamResponse_ConnectorConfig) isControlStreamResponse_RequestType() {} @@ -617,8 +619,6 @@ func (*ControlStreamResponse_PeerOffline) isControlStreamResponse_RequestType() func (*ControlStreamResponse_Session) isControlStreamResponse_RequestType() {} -func (*ControlStreamResponse_Stats) isControlStreamResponse_RequestType() {} - type Organization struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2912,7 +2912,7 @@ var file_connector_proto_rawDesc = []byte{ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x09, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, + 0x6f, 0x74, 0x6f, 0x22, 0xc2, 0x09, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, @@ -2984,80 +2984,80 @@ var file_connector_proto_rawDesc = []byte{ 0x69, 0x6f, 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x42, 0x0d, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, - 0x8f, 0x09, 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x69, 0x6e, 0x69, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x48, 0x00, 0x52, 0x04, 0x69, 0x6e, 0x69, - 0x74, 0x12, 0x48, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3f, 0x0a, 0x0d, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0c, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x43, 0x0a, 0x09, - 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x09, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, - 0x74, 0x12, 0x74, 0x0a, 0x20, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x63, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x1d, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x08, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x04, 0x73, - 0x74, 0x6f, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x48, 0x00, 0x52, 0x04, 0x73, - 0x74, 0x6f, 0x70, 0x12, 0x38, 0x0a, 0x0a, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x48, - 0x00, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x3d, 0x0a, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, - 0x00, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x12, 0x6b, 0x0a, 0x1d, - 0x73, 0x73, 0x68, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, - 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x73, 0x68, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, - 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x1a, 0x73, - 0x73, 0x68, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x69, 0x67, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x19, 0x43, 0x65, 0x72, + 0x12, 0x37, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0xd6, 0x08, 0x0a, 0x15, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, + 0x69, 0x74, 0x48, 0x00, 0x52, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x12, 0x48, 0x0a, 0x10, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3f, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x43, 0x0a, 0x09, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, + 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x61, + 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, + 0x09, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x74, 0x0a, 0x20, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, + 0x00, 0x52, 0x1d, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x32, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x64, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x04, 0x73, 0x74, 0x6f, 0x70, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x74, 0x6f, 0x70, 0x48, 0x00, 0x52, 0x04, 0x73, 0x74, 0x6f, 0x70, 0x12, 0x38, 0x0a, 0x0a, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, + 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x3d, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x12, 0x6b, 0x0a, 0x1d, 0x73, 0x73, 0x68, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x62, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x48, 0x00, 0x52, 0x17, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0d, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x0b, 0x70, - 0x65, 0x65, 0x72, 0x5f, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x65, 0x65, 0x72, 0x4f, 0x6e, - 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x4a, 0x0a, 0x0c, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x66, - 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x65, 0x65, 0x72, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x65, 0x65, 0x72, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, - 0x12, 0x37, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, - 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x74, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x74, 0x73, 0x42, 0x0d, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x62, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x73, 0x68, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x1a, 0x73, 0x73, 0x68, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x61, 0x0a, 0x19, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x69, + 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x17, 0x43, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x62, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x0b, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x6f, 0x6e, 0x6c, + 0x69, 0x6e, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, + 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, + 0x00, 0x52, 0x0a, 0x70, 0x65, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x4a, 0x0a, + 0x0c, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x30, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x4f, 0x66, 0x66, 0x6c, + 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x65, + 0x65, 0x72, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x0c, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, @@ -3465,10 +3465,10 @@ var file_connector_proto_goTypes = []any{ nil, // 37: border0.v1.AuthorizeResponse.PermissionsEntry (*common.HeartbeatMessage)(nil), // 38: border0.common.v1.HeartbeatMessage (*common.DiscoveryDetailsMessage)(nil), // 39: border0.common.v1.DiscoveryDetailsMessage - (*common.NetworkStateMessage)(nil), // 40: border0.common.v1.NetworkStateMessage - (*common.PeerOnlineMessage)(nil), // 41: border0.common.v1.PeerOnlineMessage - (*common.PeerOfflineMessage)(nil), // 42: border0.common.v1.PeerOfflineMessage - (*common.StatsMessage)(nil), // 43: border0.common.v1.StatsMessage + (*common.StatsMessage)(nil), // 40: border0.common.v1.StatsMessage + (*common.NetworkStateMessage)(nil), // 41: border0.common.v1.NetworkStateMessage + (*common.PeerOnlineMessage)(nil), // 42: border0.common.v1.PeerOnlineMessage + (*common.PeerOfflineMessage)(nil), // 43: border0.common.v1.PeerOfflineMessage (*structpb.Struct)(nil), // 44: google.protobuf.Struct (*timestamppb.Timestamp)(nil), // 45: google.protobuf.Timestamp } @@ -3488,22 +3488,22 @@ var file_connector_proto_depIdxs = []int32{ 39, // 12: border0.v1.ControlStreamRequest.discovery_details:type_name -> border0.common.v1.DiscoveryDetailsMessage 21, // 13: border0.v1.ControlStreamRequest.authorize_peer:type_name -> border0.v1.AuthorizePeerRequest 27, // 14: border0.v1.ControlStreamRequest.session:type_name -> border0.v1.SessionRequest - 6, // 15: border0.v1.ControlStreamResponse.init:type_name -> border0.v1.Init - 15, // 16: border0.v1.ControlStreamResponse.connector_config:type_name -> border0.v1.ConnectorConfig - 7, // 17: border0.v1.ControlStreamResponse.update_config:type_name -> border0.v1.UpdateConfig - 38, // 18: border0.v1.ControlStreamResponse.heartbeat:type_name -> border0.common.v1.HeartbeatMessage - 5, // 19: border0.v1.ControlStreamResponse.tunnel_certificate_sign_response:type_name -> border0.v1.TunnelCertificateSignResponse - 17, // 20: border0.v1.ControlStreamResponse.discover:type_name -> border0.v1.Discover - 18, // 21: border0.v1.ControlStreamResponse.stop:type_name -> border0.v1.Stop - 19, // 22: border0.v1.ControlStreamResponse.disconnect:type_name -> border0.v1.Disconnect - 25, // 23: border0.v1.ControlStreamResponse.authorize:type_name -> border0.v1.AuthorizeResponse - 31, // 24: border0.v1.ControlStreamResponse.ssh_certificate_sign_response:type_name -> border0.v1.SshCertificateSignResponse - 34, // 25: border0.v1.ControlStreamResponse.Certificate_sign_response:type_name -> border0.v1.CertificateSignResponse - 40, // 26: border0.v1.ControlStreamResponse.network_state:type_name -> border0.common.v1.NetworkStateMessage - 41, // 27: border0.v1.ControlStreamResponse.peer_online:type_name -> border0.common.v1.PeerOnlineMessage - 42, // 28: border0.v1.ControlStreamResponse.peer_offline:type_name -> border0.common.v1.PeerOfflineMessage - 28, // 29: border0.v1.ControlStreamResponse.session:type_name -> border0.v1.SessionResponse - 43, // 30: border0.v1.ControlStreamResponse.stats:type_name -> border0.common.v1.StatsMessage + 40, // 15: border0.v1.ControlStreamRequest.stats:type_name -> border0.common.v1.StatsMessage + 6, // 16: border0.v1.ControlStreamResponse.init:type_name -> border0.v1.Init + 15, // 17: border0.v1.ControlStreamResponse.connector_config:type_name -> border0.v1.ConnectorConfig + 7, // 18: border0.v1.ControlStreamResponse.update_config:type_name -> border0.v1.UpdateConfig + 38, // 19: border0.v1.ControlStreamResponse.heartbeat:type_name -> border0.common.v1.HeartbeatMessage + 5, // 20: border0.v1.ControlStreamResponse.tunnel_certificate_sign_response:type_name -> border0.v1.TunnelCertificateSignResponse + 17, // 21: border0.v1.ControlStreamResponse.discover:type_name -> border0.v1.Discover + 18, // 22: border0.v1.ControlStreamResponse.stop:type_name -> border0.v1.Stop + 19, // 23: border0.v1.ControlStreamResponse.disconnect:type_name -> border0.v1.Disconnect + 25, // 24: border0.v1.ControlStreamResponse.authorize:type_name -> border0.v1.AuthorizeResponse + 31, // 25: border0.v1.ControlStreamResponse.ssh_certificate_sign_response:type_name -> border0.v1.SshCertificateSignResponse + 34, // 26: border0.v1.ControlStreamResponse.Certificate_sign_response:type_name -> border0.v1.CertificateSignResponse + 41, // 27: border0.v1.ControlStreamResponse.network_state:type_name -> border0.common.v1.NetworkStateMessage + 42, // 28: border0.v1.ControlStreamResponse.peer_online:type_name -> border0.common.v1.PeerOnlineMessage + 43, // 29: border0.v1.ControlStreamResponse.peer_offline:type_name -> border0.common.v1.PeerOfflineMessage + 28, // 30: border0.v1.ControlStreamResponse.session:type_name -> border0.v1.SessionResponse 44, // 31: border0.v1.Organization.certificates:type_name -> google.protobuf.Struct 15, // 32: border0.v1.Init.connector_config:type_name -> border0.v1.ConnectorConfig 14, // 33: border0.v1.Init.sockets:type_name -> border0.v1.SocketConfig @@ -3970,6 +3970,7 @@ func file_connector_proto_init() { (*ControlStreamRequest_DiscoveryDetails)(nil), (*ControlStreamRequest_AuthorizePeer)(nil), (*ControlStreamRequest_Session)(nil), + (*ControlStreamRequest_Stats)(nil), } file_connector_proto_msgTypes[1].OneofWrappers = []any{ (*ControlStreamResponse_Init)(nil), @@ -3987,7 +3988,6 @@ func file_connector_proto_init() { (*ControlStreamResponse_PeerOnline)(nil), (*ControlStreamResponse_PeerOffline)(nil), (*ControlStreamResponse_Session)(nil), - (*ControlStreamResponse_Stats)(nil), } file_connector_proto_msgTypes[6].OneofWrappers = []any{ (*UpdateConfig_PluginConfig)(nil), diff --git a/connector/connector.pb.swift b/connector/connector.pb.swift index 81c01d4..23ddd91 100644 --- a/connector/connector.pb.swift +++ b/connector/connector.pb.swift @@ -192,6 +192,14 @@ struct Border0_V1_ControlStreamRequest: Sendable { set {requestType = .session(newValue)} } + var stats: Border0_Common_V1_StatsMessage { + get { + if case .stats(let v)? = requestType {return v} + return Border0_Common_V1_StatsMessage() + } + set {requestType = .stats(newValue)} + } + var unknownFields = SwiftProtobuf.UnknownStorage() enum OneOf_RequestType: Equatable, Sendable { @@ -210,6 +218,7 @@ struct Border0_V1_ControlStreamRequest: Sendable { case discoveryDetails(Border0_Common_V1_DiscoveryDetailsMessage) case authorizePeer(Border0_V1_AuthorizePeerRequest) case session(Border0_V1_SessionRequest) + case stats(Border0_Common_V1_StatsMessage) } @@ -343,14 +352,6 @@ struct Border0_V1_ControlStreamResponse: Sendable { set {requestType = .session(newValue)} } - var stats: Border0_Common_V1_StatsMessage { - get { - if case .stats(let v)? = requestType {return v} - return Border0_Common_V1_StatsMessage() - } - set {requestType = .stats(newValue)} - } - var unknownFields = SwiftProtobuf.UnknownStorage() enum OneOf_RequestType: Equatable, Sendable { @@ -369,7 +370,6 @@ struct Border0_V1_ControlStreamResponse: Sendable { case peerOnline(Border0_Common_V1_PeerOnlineMessage) case peerOffline(Border0_Common_V1_PeerOfflineMessage) case session(Border0_V1_SessionResponse) - case stats(Border0_Common_V1_StatsMessage) } @@ -1158,6 +1158,7 @@ extension Border0_V1_ControlStreamRequest: SwiftProtobuf.Message, SwiftProtobuf. 14: .standard(proto: "discovery_details"), 15: .standard(proto: "authorize_peer"), 16: .same(proto: "session"), + 17: .same(proto: "stats"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -1361,6 +1362,19 @@ extension Border0_V1_ControlStreamRequest: SwiftProtobuf.Message, SwiftProtobuf. self.requestType = .session(v) } }() + case 17: try { + var v: Border0_Common_V1_StatsMessage? + var hadOneofValue = false + if let current = self.requestType { + hadOneofValue = true + if case .stats(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v { + if hadOneofValue {try decoder.handleConflictingOneOf()} + self.requestType = .stats(v) + } + }() default: break } } @@ -1432,6 +1446,10 @@ extension Border0_V1_ControlStreamRequest: SwiftProtobuf.Message, SwiftProtobuf. guard case .session(let v)? = self.requestType else { preconditionFailure() } try visitor.visitSingularMessageField(value: v, fieldNumber: 16) }() + case .stats?: try { + guard case .stats(let v)? = self.requestType else { preconditionFailure() } + try visitor.visitSingularMessageField(value: v, fieldNumber: 17) + }() case nil: break } try unknownFields.traverse(visitor: &visitor) @@ -1462,7 +1480,6 @@ extension Border0_V1_ControlStreamResponse: SwiftProtobuf.Message, SwiftProtobuf 13: .standard(proto: "peer_online"), 14: .standard(proto: "peer_offline"), 16: .same(proto: "session"), - 17: .same(proto: "stats"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -1666,19 +1683,6 @@ extension Border0_V1_ControlStreamResponse: SwiftProtobuf.Message, SwiftProtobuf self.requestType = .session(v) } }() - case 17: try { - var v: Border0_Common_V1_StatsMessage? - var hadOneofValue = false - if let current = self.requestType { - hadOneofValue = true - if case .stats(let m) = current {v = m} - } - try decoder.decodeSingularMessageField(value: &v) - if let v = v { - if hadOneofValue {try decoder.handleConflictingOneOf()} - self.requestType = .stats(v) - } - }() default: break } } @@ -1750,10 +1754,6 @@ extension Border0_V1_ControlStreamResponse: SwiftProtobuf.Message, SwiftProtobuf guard case .session(let v)? = self.requestType else { preconditionFailure() } try visitor.visitSingularMessageField(value: v, fieldNumber: 16) }() - case .stats?: try { - guard case .stats(let v)? = self.requestType else { preconditionFailure() } - try visitor.visitSingularMessageField(value: v, fieldNumber: 17) - }() case nil: break } try unknownFields.traverse(visitor: &visitor) diff --git a/connector/connector.proto b/connector/connector.proto index 11d5463..6c9dea0 100644 --- a/connector/connector.proto +++ b/connector/connector.proto @@ -32,6 +32,7 @@ message ControlStreamRequest { border0.common.v1.DiscoveryDetailsMessage discovery_details = 14; AuthorizePeerRequest authorize_peer = 15; SessionRequest session = 16; + border0.common.v1.StatsMessage stats = 17; } } @@ -52,7 +53,6 @@ message ControlStreamResponse { border0.common.v1.PeerOnlineMessage peer_online = 13; border0.common.v1.PeerOfflineMessage peer_offline = 14; SessionResponse session = 16; - border0.common.v1.StatsMessage stats = 17; } }