diff --git a/common/pb/cmd_pb/cmd.pb.go b/common/pb/cmd_pb/cmd.pb.go index a58259c31..0d63f2914 100644 --- a/common/pb/cmd_pb/cmd.pb.go +++ b/common/pb/cmd_pb/cmd.pb.go @@ -91,6 +91,7 @@ const ( CommandType_DeleteEntityType CommandType = 3 CommandType_DeleteTerminatorsBatchType CommandType = 4 CommandType_SyncSnapshot CommandType = 10 + CommandType_InitClusterId CommandType = 11 ) // Enum value maps for CommandType. @@ -102,6 +103,7 @@ var ( 3: "DeleteEntityType", 4: "DeleteTerminatorsBatchType", 10: "SyncSnapshot", + 11: "InitClusterId", } CommandType_value = map[string]int32{ "Zero": 0, @@ -110,6 +112,7 @@ var ( "DeleteEntityType": 3, "DeleteTerminatorsBatchType": 4, "SyncSnapshot": 10, + "InitClusterId": 11, } ) @@ -644,6 +647,53 @@ func (x *SyncSnapshotCommand) GetSnapshot() []byte { return nil } +type InitClusterIdCommand struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterId string `protobuf:"bytes,1,opt,name=clusterId,proto3" json:"clusterId,omitempty"` +} + +func (x *InitClusterIdCommand) Reset() { + *x = InitClusterIdCommand{} + if protoimpl.UnsafeEnabled { + mi := &file_cmd_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InitClusterIdCommand) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InitClusterIdCommand) ProtoMessage() {} + +func (x *InitClusterIdCommand) ProtoReflect() protoreflect.Message { + mi := &file_cmd_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InitClusterIdCommand.ProtoReflect.Descriptor instead. +func (*InitClusterIdCommand) Descriptor() ([]byte, []int) { + return file_cmd_proto_rawDescGZIP(), []int{8} +} + +func (x *InitClusterIdCommand) GetClusterId() string { + if x != nil { + return x.ClusterId + } + return "" +} + type DeleteTerminatorsBatchCommand struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -656,7 +706,7 @@ type DeleteTerminatorsBatchCommand struct { func (x *DeleteTerminatorsBatchCommand) Reset() { *x = DeleteTerminatorsBatchCommand{} if protoimpl.UnsafeEnabled { - mi := &file_cmd_proto_msgTypes[8] + mi := &file_cmd_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -669,7 +719,7 @@ func (x *DeleteTerminatorsBatchCommand) String() string { func (*DeleteTerminatorsBatchCommand) ProtoMessage() {} func (x *DeleteTerminatorsBatchCommand) ProtoReflect() protoreflect.Message { - mi := &file_cmd_proto_msgTypes[8] + mi := &file_cmd_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -682,7 +732,7 @@ func (x *DeleteTerminatorsBatchCommand) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteTerminatorsBatchCommand.ProtoReflect.Descriptor instead. func (*DeleteTerminatorsBatchCommand) Descriptor() ([]byte, []int) { - return file_cmd_proto_rawDescGZIP(), []int{8} + return file_cmd_proto_rawDescGZIP(), []int{9} } func (x *DeleteTerminatorsBatchCommand) GetEntityIds() []string { @@ -716,7 +766,7 @@ type TagValue struct { func (x *TagValue) Reset() { *x = TagValue{} if protoimpl.UnsafeEnabled { - mi := &file_cmd_proto_msgTypes[9] + mi := &file_cmd_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -729,7 +779,7 @@ func (x *TagValue) String() string { func (*TagValue) ProtoMessage() {} func (x *TagValue) ProtoReflect() protoreflect.Message { - mi := &file_cmd_proto_msgTypes[9] + mi := &file_cmd_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -742,7 +792,7 @@ func (x *TagValue) ProtoReflect() protoreflect.Message { // Deprecated: Use TagValue.ProtoReflect.Descriptor instead. func (*TagValue) Descriptor() ([]byte, []int) { - return file_cmd_proto_rawDescGZIP(), []int{9} + return file_cmd_proto_rawDescGZIP(), []int{10} } func (m *TagValue) GetValue() isTagValue_Value { @@ -823,7 +873,7 @@ type Service struct { func (x *Service) Reset() { *x = Service{} if protoimpl.UnsafeEnabled { - mi := &file_cmd_proto_msgTypes[10] + mi := &file_cmd_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -836,7 +886,7 @@ func (x *Service) String() string { func (*Service) ProtoMessage() {} func (x *Service) ProtoReflect() protoreflect.Message { - mi := &file_cmd_proto_msgTypes[10] + mi := &file_cmd_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -849,7 +899,7 @@ func (x *Service) ProtoReflect() protoreflect.Message { // Deprecated: Use Service.ProtoReflect.Descriptor instead. func (*Service) Descriptor() ([]byte, []int) { - return file_cmd_proto_rawDescGZIP(), []int{10} + return file_cmd_proto_rawDescGZIP(), []int{11} } func (x *Service) GetId() string { @@ -904,7 +954,7 @@ type Router struct { func (x *Router) Reset() { *x = Router{} if protoimpl.UnsafeEnabled { - mi := &file_cmd_proto_msgTypes[11] + mi := &file_cmd_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -917,7 +967,7 @@ func (x *Router) String() string { func (*Router) ProtoMessage() {} func (x *Router) ProtoReflect() protoreflect.Message { - mi := &file_cmd_proto_msgTypes[11] + mi := &file_cmd_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -930,7 +980,7 @@ func (x *Router) ProtoReflect() protoreflect.Message { // Deprecated: Use Router.ProtoReflect.Descriptor instead. func (*Router) Descriptor() ([]byte, []int) { - return file_cmd_proto_rawDescGZIP(), []int{11} + return file_cmd_proto_rawDescGZIP(), []int{12} } func (x *Router) GetId() string { @@ -1007,7 +1057,7 @@ type Terminator struct { func (x *Terminator) Reset() { *x = Terminator{} if protoimpl.UnsafeEnabled { - mi := &file_cmd_proto_msgTypes[12] + mi := &file_cmd_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1020,7 +1070,7 @@ func (x *Terminator) String() string { func (*Terminator) ProtoMessage() {} func (x *Terminator) ProtoReflect() protoreflect.Message { - mi := &file_cmd_proto_msgTypes[12] + mi := &file_cmd_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1033,7 +1083,7 @@ func (x *Terminator) ProtoReflect() protoreflect.Message { // Deprecated: Use Terminator.ProtoReflect.Descriptor instead. func (*Terminator) Descriptor() ([]byte, []int) { - return file_cmd_proto_rawDescGZIP(), []int{12} + return file_cmd_proto_rawDescGZIP(), []int{13} } func (x *Terminator) GetId() string { @@ -1211,122 +1261,127 @@ var file_cmd_proto_rawDesc = []byte{ 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x22, 0x6b, 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6d, 0x6d, 0x61, - 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x73, - 0x12, 0x2c, 0x0a, 0x03, 0x63, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x6d, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x03, 0x63, 0x74, 0x78, 0x22, 0x91, - 0x01, 0x0a, 0x08, 0x54, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, 0x09, 0x62, - 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, - 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x22, 0x0a, 0x0b, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x1a, 0x0a, 0x07, 0x66, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, - 0x48, 0x00, 0x52, 0x07, 0x66, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x08, 0x6e, - 0x69, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, - 0x08, 0x6e, 0x69, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0x83, 0x02, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 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, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, - 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, - 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, - 0x67, 0x79, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x6d, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x64, 0x6c, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x78, - 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x4e, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x6d, - 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa3, 0x02, 0x0a, 0x06, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x72, 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, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, - 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x66, 0x69, - 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x20, 0x0a, - 0x0b, 0x6e, 0x6f, 0x54, 0x72, 0x61, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0b, 0x6e, 0x6f, 0x54, 0x72, 0x61, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x12, - 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x04, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x7a, 0x69, 0x74, 0x69, - 0x2e, 0x63, 0x6d, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x54, - 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x1a, 0x4e, + 0x74, 0x22, 0x34, 0x0a, 0x14, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x49, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x6b, 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x49, 0x64, 0x73, 0x12, 0x2c, 0x0a, 0x03, 0x63, 0x74, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x6d, 0x64, 0x2e, 0x70, + 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, + 0x03, 0x63, 0x74, 0x78, 0x22, 0x91, 0x01, 0x0a, 0x08, 0x54, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x1e, 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x22, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x07, 0x66, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x07, 0x66, 0x70, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x1c, 0x0a, 0x08, 0x6e, 0x69, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x08, 0x6e, 0x69, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, + 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x83, 0x02, 0x0a, 0x07, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 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, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x74, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, + 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x6d, + 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x54, 0x61, 0x67, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x20, 0x0a, 0x0b, + 0x6d, 0x61, 0x78, 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x4e, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x6d, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x61, 0x67, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8b, - 0x05, 0x0a, 0x0a, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, - 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x63, 0x65, - 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x70, 0x72, 0x65, - 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x70, 0x65, 0x65, 0x72, 0x44, - 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x7a, 0x69, 0x74, 0x69, - 0x2e, 0x63, 0x6d, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x35, 0x0a, 0x04, 0x74, 0x61, - 0x67, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, - 0x63, 0x6d, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, - 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x61, 0x76, 0x65, 0x64, 0x50, 0x72, - 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, - 0x73, 0x61, 0x76, 0x65, 0x64, 0x50, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, - 0x1e, 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x74, 0x72, 0x6c, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x74, 0x72, 0x6c, 0x1a, - 0x3b, 0x0a, 0x0d, 0x50, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4e, 0x0a, 0x09, - 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x69, 0x74, - 0x69, 0x2e, 0x63, 0x6d, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0xc3, 0x01, 0x0a, - 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x5a, 0x65, 0x72, 0x6f, 0x10, - 0x00, 0x12, 0x14, 0x0a, 0x0f, 0x4e, 0x65, 0x77, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x54, 0x79, 0x70, 0x65, 0x10, 0x82, 0x10, 0x12, 0x16, 0x0a, 0x11, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0x83, 0x10, 0x12, - 0x18, 0x0a, 0x13, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0x84, 0x10, 0x12, 0x17, 0x0a, 0x12, 0x41, 0x64, 0x64, - 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, - 0x85, 0x10, 0x12, 0x1a, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x65, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0x86, 0x10, 0x12, 0x22, - 0x0a, 0x1d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, - 0x87, 0x10, 0x2a, 0x8b, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x5a, 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, - 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x10, 0x03, 0x12, 0x1e, - 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, - 0x6f, 0x72, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x10, 0x04, 0x12, 0x10, - 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x10, 0x0a, - 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, - 0x70, 0x65, 0x6e, 0x7a, 0x69, 0x74, 0x69, 0x2f, 0x66, 0x61, 0x62, 0x72, 0x69, 0x63, 0x2f, 0x70, - 0x62, 0x2f, 0x63, 0x6d, 0x64, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa3, + 0x02, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 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, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, + 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, + 0x6f, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x6f, 0x54, 0x72, 0x61, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6e, 0x6f, 0x54, 0x72, 0x61, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x6d, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x72, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, + 0x74, 0x61, 0x67, 0x73, 0x1a, 0x4e, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x6d, 0x64, 0x2e, 0x70, 0x62, + 0x2e, 0x54, 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8b, 0x05, 0x0a, 0x0a, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, + 0x74, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, + 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, + 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x1e, 0x0a, + 0x0a, 0x70, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x41, 0x0a, + 0x08, 0x70, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x6d, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x65, + 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, + 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x35, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x6d, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, + 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x08, 0x69, 0x73, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x28, 0x0a, 0x0f, 0x73, + 0x61, 0x76, 0x65, 0x64, 0x50, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x73, 0x61, 0x76, 0x65, 0x64, 0x50, 0x72, 0x65, 0x63, 0x65, + 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, + 0x74, 0x72, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x43, 0x74, 0x72, 0x6c, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, + 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x1a, 0x4e, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x6d, 0x64, 0x2e, 0x70, 0x62, 0x2e, 0x54, + 0x61, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x2a, 0xc3, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x5a, 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x0f, 0x4e, 0x65, 0x77, 0x4c, 0x6f, + 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x10, 0x82, 0x10, 0x12, 0x16, 0x0a, + 0x11, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x10, 0x83, 0x10, 0x12, 0x18, 0x0a, 0x13, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0x84, 0x10, 0x12, + 0x17, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0x85, 0x10, 0x12, 0x1a, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x10, 0x86, 0x10, 0x12, 0x22, 0x0a, 0x1d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0x87, 0x10, 0x2a, 0x9e, 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x5a, 0x65, 0x72, 0x6f, + 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x10, 0x02, 0x12, 0x14, + 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, + 0x70, 0x65, 0x10, 0x03, 0x12, 0x1e, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, + 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, + 0x70, 0x65, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x10, 0x0a, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x10, 0x0b, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x7a, 0x69, 0x74, 0x69, + 0x2f, 0x66, 0x61, 0x62, 0x72, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x6d, 0x64, 0x5f, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1342,7 +1397,7 @@ func file_cmd_proto_rawDescGZIP() []byte { } var file_cmd_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_cmd_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_cmd_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_cmd_proto_goTypes = []interface{}{ (ContentType)(0), // 0: ziti.cmd.pb.ContentType (CommandType)(0), // 1: ziti.cmd.pb.CommandType @@ -1354,19 +1409,20 @@ var file_cmd_proto_goTypes = []interface{}{ (*UpdateEntityCommand)(nil), // 7: ziti.cmd.pb.UpdateEntityCommand (*DeleteEntityCommand)(nil), // 8: ziti.cmd.pb.DeleteEntityCommand (*SyncSnapshotCommand)(nil), // 9: ziti.cmd.pb.SyncSnapshotCommand - (*DeleteTerminatorsBatchCommand)(nil), // 10: ziti.cmd.pb.DeleteTerminatorsBatchCommand - (*TagValue)(nil), // 11: ziti.cmd.pb.TagValue - (*Service)(nil), // 12: ziti.cmd.pb.Service - (*Router)(nil), // 13: ziti.cmd.pb.Router - (*Terminator)(nil), // 14: ziti.cmd.pb.Terminator - nil, // 15: ziti.cmd.pb.ChangeContext.AttributesEntry - nil, // 16: ziti.cmd.pb.Service.TagsEntry - nil, // 17: ziti.cmd.pb.Router.TagsEntry - nil, // 18: ziti.cmd.pb.Terminator.PeerDataEntry - nil, // 19: ziti.cmd.pb.Terminator.TagsEntry + (*InitClusterIdCommand)(nil), // 10: ziti.cmd.pb.InitClusterIdCommand + (*DeleteTerminatorsBatchCommand)(nil), // 11: ziti.cmd.pb.DeleteTerminatorsBatchCommand + (*TagValue)(nil), // 12: ziti.cmd.pb.TagValue + (*Service)(nil), // 13: ziti.cmd.pb.Service + (*Router)(nil), // 14: ziti.cmd.pb.Router + (*Terminator)(nil), // 15: ziti.cmd.pb.Terminator + nil, // 16: ziti.cmd.pb.ChangeContext.AttributesEntry + nil, // 17: ziti.cmd.pb.Service.TagsEntry + nil, // 18: ziti.cmd.pb.Router.TagsEntry + nil, // 19: ziti.cmd.pb.Terminator.PeerDataEntry + nil, // 20: ziti.cmd.pb.Terminator.TagsEntry } var file_cmd_proto_depIdxs = []int32{ - 15, // 0: ziti.cmd.pb.ChangeContext.attributes:type_name -> ziti.cmd.pb.ChangeContext.AttributesEntry + 16, // 0: ziti.cmd.pb.ChangeContext.attributes:type_name -> ziti.cmd.pb.ChangeContext.AttributesEntry 2, // 1: ziti.cmd.pb.AddPeerRequest.ctx:type_name -> ziti.cmd.pb.ChangeContext 2, // 2: ziti.cmd.pb.RemovePeerRequest.ctx:type_name -> ziti.cmd.pb.ChangeContext 2, // 3: ziti.cmd.pb.TransferLeadershipRequest.ctx:type_name -> ziti.cmd.pb.ChangeContext @@ -1374,13 +1430,13 @@ var file_cmd_proto_depIdxs = []int32{ 2, // 5: ziti.cmd.pb.UpdateEntityCommand.ctx:type_name -> ziti.cmd.pb.ChangeContext 2, // 6: ziti.cmd.pb.DeleteEntityCommand.ctx:type_name -> ziti.cmd.pb.ChangeContext 2, // 7: ziti.cmd.pb.DeleteTerminatorsBatchCommand.ctx:type_name -> ziti.cmd.pb.ChangeContext - 16, // 8: ziti.cmd.pb.Service.tags:type_name -> ziti.cmd.pb.Service.TagsEntry - 17, // 9: ziti.cmd.pb.Router.tags:type_name -> ziti.cmd.pb.Router.TagsEntry - 18, // 10: ziti.cmd.pb.Terminator.peerData:type_name -> ziti.cmd.pb.Terminator.PeerDataEntry - 19, // 11: ziti.cmd.pb.Terminator.tags:type_name -> ziti.cmd.pb.Terminator.TagsEntry - 11, // 12: ziti.cmd.pb.Service.TagsEntry.value:type_name -> ziti.cmd.pb.TagValue - 11, // 13: ziti.cmd.pb.Router.TagsEntry.value:type_name -> ziti.cmd.pb.TagValue - 11, // 14: ziti.cmd.pb.Terminator.TagsEntry.value:type_name -> ziti.cmd.pb.TagValue + 17, // 8: ziti.cmd.pb.Service.tags:type_name -> ziti.cmd.pb.Service.TagsEntry + 18, // 9: ziti.cmd.pb.Router.tags:type_name -> ziti.cmd.pb.Router.TagsEntry + 19, // 10: ziti.cmd.pb.Terminator.peerData:type_name -> ziti.cmd.pb.Terminator.PeerDataEntry + 20, // 11: ziti.cmd.pb.Terminator.tags:type_name -> ziti.cmd.pb.Terminator.TagsEntry + 12, // 12: ziti.cmd.pb.Service.TagsEntry.value:type_name -> ziti.cmd.pb.TagValue + 12, // 13: ziti.cmd.pb.Router.TagsEntry.value:type_name -> ziti.cmd.pb.TagValue + 12, // 14: ziti.cmd.pb.Terminator.TagsEntry.value:type_name -> ziti.cmd.pb.TagValue 15, // [15:15] is the sub-list for method output_type 15, // [15:15] is the sub-list for method input_type 15, // [15:15] is the sub-list for extension type_name @@ -1491,7 +1547,7 @@ func file_cmd_proto_init() { } } file_cmd_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteTerminatorsBatchCommand); i { + switch v := v.(*InitClusterIdCommand); i { case 0: return &v.state case 1: @@ -1503,7 +1559,7 @@ func file_cmd_proto_init() { } } file_cmd_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TagValue); i { + switch v := v.(*DeleteTerminatorsBatchCommand); i { case 0: return &v.state case 1: @@ -1515,7 +1571,7 @@ func file_cmd_proto_init() { } } file_cmd_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Service); i { + switch v := v.(*TagValue); i { case 0: return &v.state case 1: @@ -1527,7 +1583,7 @@ func file_cmd_proto_init() { } } file_cmd_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Router); i { + switch v := v.(*Service); i { case 0: return &v.state case 1: @@ -1539,6 +1595,18 @@ func file_cmd_proto_init() { } } file_cmd_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Router); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cmd_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Terminator); i { case 0: return &v.state @@ -1551,7 +1619,7 @@ func file_cmd_proto_init() { } } } - file_cmd_proto_msgTypes[9].OneofWrappers = []interface{}{ + file_cmd_proto_msgTypes[10].OneofWrappers = []interface{}{ (*TagValue_BoolValue)(nil), (*TagValue_StringValue)(nil), (*TagValue_FpValue)(nil), @@ -1563,7 +1631,7 @@ func file_cmd_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cmd_proto_rawDesc, NumEnums: 2, - NumMessages: 18, + NumMessages: 19, NumExtensions: 0, NumServices: 0, }, diff --git a/common/pb/cmd_pb/cmd.proto b/common/pb/cmd_pb/cmd.proto index 6a2f4f50e..b244f4822 100644 --- a/common/pb/cmd_pb/cmd.proto +++ b/common/pb/cmd_pb/cmd.proto @@ -25,6 +25,7 @@ enum CommandType { DeleteTerminatorsBatchType = 4; SyncSnapshot = 10; + InitClusterId = 11; } message ChangeContext { @@ -76,6 +77,10 @@ message SyncSnapshotCommand { bytes snapshot = 2; } +message InitClusterIdCommand { + string clusterId = 1; +} + message DeleteTerminatorsBatchCommand { repeated string entityIds = 1; ChangeContext ctx = 2; diff --git a/common/pb/cmd_pb/impl.go b/common/pb/cmd_pb/impl.go index 307b944a0..8e5e1fd22 100644 --- a/common/pb/cmd_pb/impl.go +++ b/common/pb/cmd_pb/impl.go @@ -55,6 +55,10 @@ func (x *SyncSnapshotCommand) GetCommandType() int32 { return int32(CommandType_SyncSnapshot) } +func (x *InitClusterIdCommand) GetCommandType() int32 { + return int32(CommandType_InitClusterId) +} + func EncodeTags(tags map[string]interface{}) (map[string]*TagValue, error) { if len(tags) == 0 { return nil, nil diff --git a/common/pb/ctrl_pb/impl.go b/common/pb/ctrl_pb/impl.go index 33505afe7..050c21643 100644 --- a/common/pb/ctrl_pb/impl.go +++ b/common/pb/ctrl_pb/impl.go @@ -17,7 +17,6 @@ package ctrl_pb import ( - "github.com/openziti/channel/v3/protobufs" "github.com/openziti/ziti/controller/xt" ) @@ -110,29 +109,3 @@ func (request *UpdateCtrlAddresses) GetContentType() int32 { func (request *PeerStateChanges) GetContentType() int32 { return int32(ContentType_PeerStateChangeRequestType) } - -type FilterableValidateTerminatorsRequest interface { - protobufs.TypedMessage - FilterTerminators(f func(terminator *Terminator) bool) - GetTerminators() []*Terminator -} - -func (request *ValidateTerminatorsRequest) FilterTerminators(f func(terminator *Terminator) bool) { - var terminators []*Terminator - for _, terminator := range request.Terminators { - if f(terminator) { - terminators = append(terminators, terminator) - } - } - request.Terminators = terminators -} - -func (request *ValidateTerminatorsV2Request) FilterTerminators(f func(terminator *Terminator) bool) { - var terminators []*Terminator - for _, terminator := range request.Terminators { - if f(terminator) { - terminators = append(terminators, terminator) - } - } - request.Terminators = terminators -} diff --git a/common/pb/edge_mgmt_pb/edge_mgmt.pb.go b/common/pb/edge_mgmt_pb/edge_mgmt.pb.go deleted file mode 100644 index b8fa212d6..000000000 --- a/common/pb/edge_mgmt_pb/edge_mgmt.pb.go +++ /dev/null @@ -1,216 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc v3.21.12 -// source: edge_mgmt.proto - -package edge_mgmt_pb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CommandType int32 - -const ( - CommandType_Zero CommandType = 0 - CommandType_InitEdgeType CommandType = 1000 -) - -// Enum value maps for CommandType. -var ( - CommandType_name = map[int32]string{ - 0: "Zero", - 1000: "InitEdgeType", - } - CommandType_value = map[string]int32{ - "Zero": 0, - "InitEdgeType": 1000, - } -) - -func (x CommandType) Enum() *CommandType { - p := new(CommandType) - *p = x - return p -} - -func (x CommandType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CommandType) Descriptor() protoreflect.EnumDescriptor { - return file_edge_mgmt_proto_enumTypes[0].Descriptor() -} - -func (CommandType) Type() protoreflect.EnumType { - return &file_edge_mgmt_proto_enumTypes[0] -} - -func (x CommandType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CommandType.Descriptor instead. -func (CommandType) EnumDescriptor() ([]byte, []int) { - return file_edge_mgmt_proto_rawDescGZIP(), []int{0} -} - -type InitEdgeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *InitEdgeRequest) Reset() { - *x = InitEdgeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_edge_mgmt_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InitEdgeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InitEdgeRequest) ProtoMessage() {} - -func (x *InitEdgeRequest) ProtoReflect() protoreflect.Message { - mi := &file_edge_mgmt_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InitEdgeRequest.ProtoReflect.Descriptor instead. -func (*InitEdgeRequest) Descriptor() ([]byte, []int) { - return file_edge_mgmt_proto_rawDescGZIP(), []int{0} -} - -func (x *InitEdgeRequest) GetUsername() string { - if x != nil { - return x.Username - } - return "" -} - -func (x *InitEdgeRequest) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -func (x *InitEdgeRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -var File_edge_mgmt_proto protoreflect.FileDescriptor - -var file_edge_mgmt_proto_rawDesc = []byte{ - 0x0a, 0x0f, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x11, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x70, 0x62, 0x22, 0x5d, 0x0a, 0x0f, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x64, 0x67, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x2a, 0x2a, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x5a, 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0c, - 0x49, 0x6e, 0x69, 0x74, 0x45, 0x64, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xe8, 0x07, 0x42, - 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, - 0x65, 0x6e, 0x7a, 0x69, 0x74, 0x69, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x2f, 0x70, 0x62, 0x2f, 0x65, - 0x64, 0x67, 0x65, 0x5f, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_edge_mgmt_proto_rawDescOnce sync.Once - file_edge_mgmt_proto_rawDescData = file_edge_mgmt_proto_rawDesc -) - -func file_edge_mgmt_proto_rawDescGZIP() []byte { - file_edge_mgmt_proto_rawDescOnce.Do(func() { - file_edge_mgmt_proto_rawDescData = protoimpl.X.CompressGZIP(file_edge_mgmt_proto_rawDescData) - }) - return file_edge_mgmt_proto_rawDescData -} - -var file_edge_mgmt_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_edge_mgmt_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_edge_mgmt_proto_goTypes = []interface{}{ - (CommandType)(0), // 0: ziti.edge_mgmt.pb.CommandType - (*InitEdgeRequest)(nil), // 1: ziti.edge_mgmt.pb.InitEdgeRequest -} -var file_edge_mgmt_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_edge_mgmt_proto_init() } -func file_edge_mgmt_proto_init() { - if File_edge_mgmt_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_edge_mgmt_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InitEdgeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_edge_mgmt_proto_rawDesc, - NumEnums: 1, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_edge_mgmt_proto_goTypes, - DependencyIndexes: file_edge_mgmt_proto_depIdxs, - EnumInfos: file_edge_mgmt_proto_enumTypes, - MessageInfos: file_edge_mgmt_proto_msgTypes, - }.Build() - File_edge_mgmt_proto = out.File - file_edge_mgmt_proto_rawDesc = nil - file_edge_mgmt_proto_goTypes = nil - file_edge_mgmt_proto_depIdxs = nil -} diff --git a/common/pb/edge_mgmt_pb/edge_mgmt.proto b/common/pb/edge_mgmt_pb/edge_mgmt.proto deleted file mode 100644 index 3a3164533..000000000 --- a/common/pb/edge_mgmt_pb/edge_mgmt.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; - -package ziti.edge_mgmt.pb; -option go_package = "github.com/openziti/edge/pb/edge_mgmt_pb"; - -enum CommandType { - Zero = 0; - InitEdgeType = 1000; -} - -message InitEdgeRequest { - string username = 1; - string password = 2; - string name = 3; -} \ No newline at end of file diff --git a/common/pb/edge_mgmt_pb/generate.go b/common/pb/edge_mgmt_pb/generate.go deleted file mode 100644 index a43d2e1d9..000000000 --- a/common/pb/edge_mgmt_pb/generate.go +++ /dev/null @@ -1,5 +0,0 @@ -//go:generate protoc -I ./ ./edge_mgmt.proto --go_out=paths=source_relative:./ - -package edge_mgmt_pb - -// Here to provide the go:generate line above diff --git a/common/pb/edge_mgmt_pb/impl.go b/common/pb/edge_mgmt_pb/impl.go deleted file mode 100644 index 862b440cb..000000000 --- a/common/pb/edge_mgmt_pb/impl.go +++ /dev/null @@ -1,5 +0,0 @@ -package edge_mgmt_pb - -func (x *InitEdgeRequest) GetContentType() int32 { - return int32(CommandType_InitEdgeType) -} diff --git a/common/pb/mgmt_pb/impl.go b/common/pb/mgmt_pb/impl.go index b8506d876..e06156b48 100644 --- a/common/pb/mgmt_pb/impl.go +++ b/common/pb/mgmt_pb/impl.go @@ -71,3 +71,7 @@ func (request *ValidateIdentityConnectionStatusesResponse) GetContentType() int3 func (request *RouterIdentityConnectionStatusesDetails) GetContentType() int32 { return int32(ContentType_ValidateIdentityConnectionStatusesResultType) } + +func (x *InitRequest) GetContentType() int32 { + return int32(ContentType_RaftInit) +} diff --git a/common/pb/mgmt_pb/mgmt.pb.go b/common/pb/mgmt_pb/mgmt.pb.go index 3d13ba444..67fdf64da 100644 --- a/common/pb/mgmt_pb/mgmt.pb.go +++ b/common/pb/mgmt_pb/mgmt.pb.go @@ -55,6 +55,7 @@ const ( ContentType_RaftRemovePeerRequestType ContentType = 10083 ContentType_RaftTransferLeadershipRequestType ContentType = 10084 ContentType_RaftInitFromDb ContentType = 10085 + ContentType_RaftInit ContentType = 10086 // Validate ContentType_ValidateTerminatorsRequestType ContentType = 10100 ContentType_ValidateTerminatorResponseType ContentType = 10101 @@ -101,6 +102,7 @@ var ( 10083: "RaftRemovePeerRequestType", 10084: "RaftTransferLeadershipRequestType", 10085: "RaftInitFromDb", + 10086: "RaftInit", 10100: "ValidateTerminatorsRequestType", 10101: "ValidateTerminatorResponseType", 10102: "ValidateTerminatorResultType", @@ -143,6 +145,7 @@ var ( "RaftRemovePeerRequestType": 10083, "RaftTransferLeadershipRequestType": 10084, "RaftInitFromDb": 10085, + "RaftInit": 10086, "ValidateTerminatorsRequestType": 10100, "ValidateTerminatorResponseType": 10101, "ValidateTerminatorResultType": 10102, @@ -2334,6 +2337,69 @@ func (x *RouterIdentityConnectionStatusesDetails) GetErrors() []string { return nil } +type InitRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *InitRequest) Reset() { + *x = InitRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mgmt_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InitRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InitRequest) ProtoMessage() {} + +func (x *InitRequest) ProtoReflect() protoreflect.Message { + mi := &file_mgmt_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InitRequest.ProtoReflect.Descriptor instead. +func (*InitRequest) Descriptor() ([]byte, []int) { + return file_mgmt_proto_rawDescGZIP(), []int{27} +} + +func (x *InitRequest) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *InitRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *InitRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + type StreamMetricsRequest_MetricMatcher struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2346,7 +2412,7 @@ type StreamMetricsRequest_MetricMatcher struct { func (x *StreamMetricsRequest_MetricMatcher) Reset() { *x = StreamMetricsRequest_MetricMatcher{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_proto_msgTypes[27] + mi := &file_mgmt_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2359,7 +2425,7 @@ func (x *StreamMetricsRequest_MetricMatcher) String() string { func (*StreamMetricsRequest_MetricMatcher) ProtoMessage() {} func (x *StreamMetricsRequest_MetricMatcher) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_proto_msgTypes[27] + mi := &file_mgmt_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2403,7 +2469,7 @@ type StreamMetricsEvent_IntervalMetric struct { func (x *StreamMetricsEvent_IntervalMetric) Reset() { *x = StreamMetricsEvent_IntervalMetric{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_proto_msgTypes[31] + mi := &file_mgmt_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2416,7 +2482,7 @@ func (x *StreamMetricsEvent_IntervalMetric) String() string { func (*StreamMetricsEvent_IntervalMetric) ProtoMessage() {} func (x *StreamMetricsEvent_IntervalMetric) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_proto_msgTypes[31] + mi := &file_mgmt_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2473,7 +2539,7 @@ type InspectResponse_InspectValue struct { func (x *InspectResponse_InspectValue) Reset() { *x = InspectResponse_InspectValue{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_proto_msgTypes[34] + mi := &file_mgmt_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2486,7 +2552,7 @@ func (x *InspectResponse_InspectValue) String() string { func (*InspectResponse_InspectValue) ProtoMessage() {} func (x *InspectResponse_InspectValue) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_proto_msgTypes[34] + mi := &file_mgmt_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2867,130 +2933,137 @@ var file_mgmt_proto_rawDesc = []byte{ 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2a, 0xb6, 0x0b, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x5a, 0x65, 0x72, 0x6f, 0x10, 0x00, - 0x12, 0x1c, 0x0a, 0x17, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xb8, 0x4e, 0x12, 0x1a, - 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x76, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xb9, 0x4e, 0x12, 0x20, 0x0a, 0x1b, 0x54, 0x6f, - 0x67, 0x67, 0x6c, 0x65, 0x50, 0x69, 0x70, 0x65, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xbc, 0x4e, 0x12, 0x23, 0x0a, 0x1e, - 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x54, 0x72, 0x61, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xbd, - 0x4e, 0x12, 0x1c, 0x0a, 0x17, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xbe, 0x4e, 0x12, - 0x1a, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xbf, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x49, - 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x10, 0xc0, 0x4e, 0x12, 0x18, 0x0a, 0x13, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xc1, 0x4e, 0x12, 0x1a, - 0x0a, 0x15, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x62, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xd6, 0x4e, 0x12, 0x25, 0x0a, 0x20, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x72, 0x44, 0x65, 0x62, 0x75, 0x67, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x74, 0x4c, - 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xd7, - 0x4e, 0x12, 0x2c, 0x0a, 0x27, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x44, 0x65, 0x62, 0x75, 0x67, - 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x43, 0x74, 0x72, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xd8, 0x4e, 0x12, - 0x26, 0x0a, 0x21, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x44, 0x65, 0x62, 0x75, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x10, 0xd9, 0x4e, 0x12, 0x2e, 0x0a, 0x29, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x72, 0x44, 0x65, 0x62, 0x75, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, - 0x64, 0x65, 0x72, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x10, 0xda, 0x4e, 0x12, 0x24, 0x0a, 0x1f, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x72, 0x44, 0x65, 0x62, 0x75, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xdb, 0x4e, 0x12, 0x22, 0x0a, - 0x1d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x44, 0x65, 0x62, 0x75, 0x67, 0x55, 0x6e, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xdc, - 0x4e, 0x12, 0x1d, 0x0a, 0x18, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x51, 0x75, 0x69, 0x65, 0x73, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xdd, 0x4e, - 0x12, 0x1f, 0x0a, 0x1a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x44, 0x65, 0x71, 0x75, 0x69, 0x65, - 0x73, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xde, - 0x4e, 0x12, 0x22, 0x0a, 0x1d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x44, 0x65, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x10, 0xdf, 0x4e, 0x12, 0x1f, 0x0a, 0x1a, 0x52, 0x61, 0x66, 0x74, 0x4c, 0x69, 0x73, - 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x10, 0xe0, 0x4e, 0x12, 0x20, 0x0a, 0x1b, 0x52, 0x61, 0x66, 0x74, 0x4c, 0x69, - 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xe1, 0x4e, 0x12, 0x1b, 0x0a, 0x16, 0x52, 0x61, 0x66, 0x74, - 0x41, 0x64, 0x64, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x10, 0xe2, 0x4e, 0x12, 0x1e, 0x0a, 0x19, 0x52, 0x61, 0x66, 0x74, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x10, 0xe3, 0x4e, 0x12, 0x26, 0x0a, 0x21, 0x52, 0x61, 0x66, 0x74, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xe4, 0x4e, 0x12, 0x13, 0x0a, - 0x0e, 0x52, 0x61, 0x66, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x44, 0x62, 0x10, - 0xe5, 0x4e, 0x12, 0x23, 0x0a, 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x10, 0xf4, 0x4e, 0x12, 0x23, 0x0a, 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf5, 0x4e, 0x12, 0x21, 0x0a, 0x1c, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x59, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x2a, 0xc5, 0x0b, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x08, 0x0a, 0x04, 0x5a, 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x17, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xb8, 0x4e, 0x12, 0x1a, 0x0a, 0x15, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x10, 0xb9, 0x4e, 0x12, 0x20, 0x0a, 0x1b, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x50, + 0x69, 0x70, 0x65, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x10, 0xbc, 0x4e, 0x12, 0x23, 0x0a, 0x1e, 0x54, 0x6f, 0x67, 0x67, 0x6c, + 0x65, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xbd, 0x4e, 0x12, 0x1c, 0x0a, 0x17, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xbe, 0x4e, 0x12, 0x1a, 0x0a, 0x15, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x10, 0xbf, 0x4e, 0x12, 0x17, 0x0a, 0x12, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xc0, 0x4e, 0x12, + 0x18, 0x0a, 0x13, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xc1, 0x4e, 0x12, 0x1a, 0x0a, 0x15, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x44, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x10, 0xd6, 0x4e, 0x12, 0x25, 0x0a, 0x20, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x44, + 0x65, 0x62, 0x75, 0x67, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xd7, 0x4e, 0x12, 0x2c, 0x0a, 0x27, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, + 0x65, 0x43, 0x74, 0x72, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xd8, 0x4e, 0x12, 0x26, 0x0a, 0x21, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x72, 0x44, 0x65, 0x62, 0x75, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, + 0xd9, 0x4e, 0x12, 0x2e, 0x0a, 0x29, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x44, 0x65, 0x62, 0x75, + 0x67, 0x44, 0x75, 0x6d, 0x70, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x72, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, + 0xda, 0x4e, 0x12, 0x24, 0x0a, 0x1f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x44, 0x65, 0x62, 0x75, + 0x67, 0x44, 0x75, 0x6d, 0x70, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xdb, 0x4e, 0x12, 0x22, 0x0a, 0x1d, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x72, 0x44, 0x65, 0x62, 0x75, 0x67, 0x55, 0x6e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xdc, 0x4e, 0x12, 0x1d, 0x0a, 0x18, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x51, 0x75, 0x69, 0x65, 0x73, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xdd, 0x4e, 0x12, 0x1f, 0x0a, 0x1a, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x44, 0x65, 0x71, 0x75, 0x69, 0x65, 0x73, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xde, 0x4e, 0x12, 0x22, 0x0a, 0x1d, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x44, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xdf, 0x4e, + 0x12, 0x1f, 0x0a, 0x1a, 0x52, 0x61, 0x66, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xe0, + 0x4e, 0x12, 0x20, 0x0a, 0x1b, 0x52, 0x61, 0x66, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x10, 0xe1, 0x4e, 0x12, 0x1b, 0x0a, 0x16, 0x52, 0x61, 0x66, 0x74, 0x41, 0x64, 0x64, 0x50, 0x65, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xe2, 0x4e, + 0x12, 0x1e, 0x0a, 0x19, 0x52, 0x61, 0x66, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x65, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xe3, 0x4e, + 0x12, 0x26, 0x0a, 0x21, 0x52, 0x61, 0x66, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xe4, 0x4e, 0x12, 0x13, 0x0a, 0x0e, 0x52, 0x61, 0x66, 0x74, + 0x49, 0x6e, 0x69, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x44, 0x62, 0x10, 0xe5, 0x4e, 0x12, 0x0d, 0x0a, + 0x08, 0x52, 0x61, 0x66, 0x74, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xe6, 0x4e, 0x12, 0x23, 0x0a, 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, - 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf6, 0x4e, 0x12, - 0x23, 0x0a, 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x10, 0xf7, 0x4e, 0x12, 0x24, 0x0a, 0x1f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf8, 0x4e, 0x12, 0x22, 0x0a, 0x1d, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, - 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf9, 0x4e, 0x12, 0x2c, - 0x0a, 0x27, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, - 0x53, 0x64, 0x6b, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xfa, 0x4e, 0x12, 0x2d, 0x0a, 0x28, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x53, 0x64, - 0x6b, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xfb, 0x4e, 0x12, 0x2b, 0x0a, 0x26, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x53, 0x64, 0x6b, - 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xfc, 0x4e, 0x12, 0x27, 0x0a, 0x22, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x6f, - 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xfd, - 0x4e, 0x12, 0x28, 0x0a, 0x23, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xfe, 0x4e, 0x12, 0x26, 0x0a, 0x21, 0x56, + 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf4, + 0x4e, 0x12, 0x23, 0x0a, 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x10, 0xf5, 0x4e, 0x12, 0x21, 0x0a, 0x1c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf6, 0x4e, 0x12, 0x23, 0x0a, 0x1e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf7, 0x4e, 0x12, 0x24, + 0x0a, 0x1f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x10, 0xf8, 0x4e, 0x12, 0x22, 0x0a, 0x1d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf9, 0x4e, 0x12, 0x2c, 0x0a, 0x27, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x53, 0x64, 0x6b, 0x54, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x10, 0xfa, 0x4e, 0x12, 0x2d, 0x0a, 0x28, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x53, 0x64, 0x6b, 0x54, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x10, 0xfb, 0x4e, 0x12, 0x2b, 0x0a, 0x26, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x53, 0x64, 0x6b, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, + 0xfc, 0x4e, 0x12, 0x27, 0x0a, 0x22, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xfd, 0x4e, 0x12, 0x28, 0x0a, 0x23, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, - 0x61, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x10, 0xff, 0x4e, 0x12, 0x32, 0x0a, 0x2d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x49, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x10, 0x80, 0x4f, 0x12, 0x33, 0x0a, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0x81, 0x4f, 0x12, 0x31, 0x0a, 0x2c, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0x82, 0x4f, 0x2a, - 0x53, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x6f, 0x6e, - 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x0a, 0x12, 0x12, - 0x0a, 0x0e, 0x43, 0x74, 0x72, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, - 0x10, 0x0b, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x49, 0x64, 0x10, 0x0c, 0x2a, 0x78, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x69, - 0x72, 0x63, 0x75, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, - 0x0a, 0x0e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, - 0x74, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x61, - 0x74, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x43, - 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x04, 0x2a, 0x2b, - 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x10, 0x00, 0x12, 0x0b, - 0x0a, 0x07, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x10, 0x01, 0x2a, 0x77, 0x0a, 0x0f, 0x54, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x09, - 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, - 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x10, - 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x55, 0x6e, 0x6b, 0x6e, - 0x6f, 0x77, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x10, 0x03, 0x12, - 0x13, 0x0a, 0x0f, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x42, 0x61, 0x64, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x10, 0x04, 0x2a, 0x53, 0x0a, 0x09, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x69, 0x6e, 0x6b, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, - 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x69, 0x6e, 0x6b, 0x45, 0x73, 0x74, 0x61, 0x62, 0x6c, - 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x69, 0x6e, 0x6b, 0x50, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x69, 0x6e, 0x6b, - 0x44, 0x69, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x10, 0x03, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x7a, 0x69, 0x74, 0x69, - 0x2f, 0x66, 0x61, 0x62, 0x72, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x2f, 0x6d, 0x67, 0x6d, 0x74, 0x5f, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x10, 0xfe, 0x4e, 0x12, 0x26, 0x0a, 0x21, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x6f, 0x64, 0x65, 0x6c, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xff, 0x4e, 0x12, 0x32, 0x0a, + 0x2d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0x80, + 0x4f, 0x12, 0x33, 0x0a, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x10, 0x81, 0x4f, 0x12, 0x31, 0x0a, 0x2c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0x82, 0x4f, 0x2a, 0x53, 0x0a, 0x06, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x6f, 0x6e, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x0a, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x74, 0x72, 0x6c, + 0x43, 0x68, 0x61, 0x6e, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x10, 0x0b, 0x12, 0x10, 0x0a, 0x0c, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x49, 0x64, 0x10, 0x0c, 0x2a, 0x78, + 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x69, 0x72, 0x63, + 0x75, 0x69, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, + 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x10, 0x01, + 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x50, 0x72, 0x65, 0x73, 0x65, + 0x6e, 0x74, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, + 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x04, 0x2a, 0x2b, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x63, + 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x45, + 0x58, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x43, 0x4c, + 0x55, 0x44, 0x45, 0x10, 0x01, 0x2a, 0x77, 0x0a, 0x0f, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, + 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x01, + 0x12, 0x19, 0x0a, 0x15, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, + 0x77, 0x6e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x49, + 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x6e, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x42, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x10, 0x04, 0x2a, 0x53, + 0x0a, 0x09, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, + 0x69, 0x6e, 0x6b, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, + 0x4c, 0x69, 0x6e, 0x6b, 0x45, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, + 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x69, 0x6e, 0x6b, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x69, 0x6e, 0x6b, 0x44, 0x69, 0x61, 0x6c, 0x69, 0x6e, + 0x67, 0x10, 0x03, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x7a, 0x69, 0x74, 0x69, 0x2f, 0x66, 0x61, 0x62, 0x72, 0x69, + 0x63, 0x2f, 0x70, 0x62, 0x2f, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3006,7 +3079,7 @@ func file_mgmt_proto_rawDescGZIP() []byte { } var file_mgmt_proto_enumTypes = make([]protoimpl.EnumInfo, 6) -var file_mgmt_proto_msgTypes = make([]protoimpl.MessageInfo, 35) +var file_mgmt_proto_msgTypes = make([]protoimpl.MessageInfo, 36) var file_mgmt_proto_goTypes = []interface{}{ (ContentType)(0), // 0: ziti.mgmt_pb.ContentType (Header)(0), // 1: ziti.mgmt_pb.Header @@ -3041,28 +3114,29 @@ var file_mgmt_proto_goTypes = []interface{}{ (*ValidateIdentityConnectionStatusesRequest)(nil), // 30: ziti.mgmt_pb.ValidateIdentityConnectionStatusesRequest (*ValidateIdentityConnectionStatusesResponse)(nil), // 31: ziti.mgmt_pb.ValidateIdentityConnectionStatusesResponse (*RouterIdentityConnectionStatusesDetails)(nil), // 32: ziti.mgmt_pb.RouterIdentityConnectionStatusesDetails - (*StreamMetricsRequest_MetricMatcher)(nil), // 33: ziti.mgmt_pb.StreamMetricsRequest.MetricMatcher - nil, // 34: ziti.mgmt_pb.StreamMetricsEvent.TagsEntry - nil, // 35: ziti.mgmt_pb.StreamMetricsEvent.IntMetricsEntry - nil, // 36: ziti.mgmt_pb.StreamMetricsEvent.FloatMetricsEntry - (*StreamMetricsEvent_IntervalMetric)(nil), // 37: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric - nil, // 38: ziti.mgmt_pb.StreamMetricsEvent.MetricGroupEntry - nil, // 39: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.ValuesEntry - (*InspectResponse_InspectValue)(nil), // 40: ziti.mgmt_pb.InspectResponse.InspectValue - (*timestamppb.Timestamp)(nil), // 41: google.protobuf.Timestamp + (*InitRequest)(nil), // 33: ziti.mgmt_pb.InitRequest + (*StreamMetricsRequest_MetricMatcher)(nil), // 34: ziti.mgmt_pb.StreamMetricsRequest.MetricMatcher + nil, // 35: ziti.mgmt_pb.StreamMetricsEvent.TagsEntry + nil, // 36: ziti.mgmt_pb.StreamMetricsEvent.IntMetricsEntry + nil, // 37: ziti.mgmt_pb.StreamMetricsEvent.FloatMetricsEntry + (*StreamMetricsEvent_IntervalMetric)(nil), // 38: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric + nil, // 39: ziti.mgmt_pb.StreamMetricsEvent.MetricGroupEntry + nil, // 40: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.ValuesEntry + (*InspectResponse_InspectValue)(nil), // 41: ziti.mgmt_pb.InspectResponse.InspectValue + (*timestamppb.Timestamp)(nil), // 42: google.protobuf.Timestamp } var file_mgmt_proto_depIdxs = []int32{ - 33, // 0: ziti.mgmt_pb.StreamMetricsRequest.matchers:type_name -> ziti.mgmt_pb.StreamMetricsRequest.MetricMatcher - 41, // 1: ziti.mgmt_pb.StreamMetricsEvent.timestamp:type_name -> google.protobuf.Timestamp - 34, // 2: ziti.mgmt_pb.StreamMetricsEvent.tags:type_name -> ziti.mgmt_pb.StreamMetricsEvent.TagsEntry - 35, // 3: ziti.mgmt_pb.StreamMetricsEvent.intMetrics:type_name -> ziti.mgmt_pb.StreamMetricsEvent.IntMetricsEntry - 36, // 4: ziti.mgmt_pb.StreamMetricsEvent.floatMetrics:type_name -> ziti.mgmt_pb.StreamMetricsEvent.FloatMetricsEntry - 37, // 5: ziti.mgmt_pb.StreamMetricsEvent.intervalMetrics:type_name -> ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric - 38, // 6: ziti.mgmt_pb.StreamMetricsEvent.metricGroup:type_name -> ziti.mgmt_pb.StreamMetricsEvent.MetricGroupEntry + 34, // 0: ziti.mgmt_pb.StreamMetricsRequest.matchers:type_name -> ziti.mgmt_pb.StreamMetricsRequest.MetricMatcher + 42, // 1: ziti.mgmt_pb.StreamMetricsEvent.timestamp:type_name -> google.protobuf.Timestamp + 35, // 2: ziti.mgmt_pb.StreamMetricsEvent.tags:type_name -> ziti.mgmt_pb.StreamMetricsEvent.TagsEntry + 36, // 3: ziti.mgmt_pb.StreamMetricsEvent.intMetrics:type_name -> ziti.mgmt_pb.StreamMetricsEvent.IntMetricsEntry + 37, // 4: ziti.mgmt_pb.StreamMetricsEvent.floatMetrics:type_name -> ziti.mgmt_pb.StreamMetricsEvent.FloatMetricsEntry + 38, // 5: ziti.mgmt_pb.StreamMetricsEvent.intervalMetrics:type_name -> ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric + 39, // 6: ziti.mgmt_pb.StreamMetricsEvent.metricGroup:type_name -> ziti.mgmt_pb.StreamMetricsEvent.MetricGroupEntry 2, // 7: ziti.mgmt_pb.StreamCircuitsEvent.eventType:type_name -> ziti.mgmt_pb.StreamCircuitEventType 8, // 8: ziti.mgmt_pb.StreamCircuitsEvent.path:type_name -> ziti.mgmt_pb.Path 3, // 9: ziti.mgmt_pb.StreamTracesRequest.filterType:type_name -> ziti.mgmt_pb.TraceFilterType - 40, // 10: ziti.mgmt_pb.InspectResponse.values:type_name -> ziti.mgmt_pb.InspectResponse.InspectValue + 41, // 10: ziti.mgmt_pb.InspectResponse.values:type_name -> ziti.mgmt_pb.InspectResponse.InspectValue 14, // 11: ziti.mgmt_pb.RaftMemberListResponse.members:type_name -> ziti.mgmt_pb.RaftMember 4, // 12: ziti.mgmt_pb.TerminatorDetail.state:type_name -> ziti.mgmt_pb.TerminatorState 22, // 13: ziti.mgmt_pb.RouterLinkDetails.linkDetails:type_name -> ziti.mgmt_pb.RouterLinkDetail @@ -3070,9 +3144,9 @@ var file_mgmt_proto_depIdxs = []int32{ 5, // 15: ziti.mgmt_pb.RouterLinkDetail.routerState:type_name -> ziti.mgmt_pb.LinkState 26, // 16: ziti.mgmt_pb.RouterSdkTerminatorsDetails.details:type_name -> ziti.mgmt_pb.RouterSdkTerminatorDetail 4, // 17: ziti.mgmt_pb.RouterSdkTerminatorDetail.ctrlState:type_name -> ziti.mgmt_pb.TerminatorState - 41, // 18: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.intervalStartUTC:type_name -> google.protobuf.Timestamp - 41, // 19: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.intervalEndUTC:type_name -> google.protobuf.Timestamp - 39, // 20: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.values:type_name -> ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.ValuesEntry + 42, // 18: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.intervalStartUTC:type_name -> google.protobuf.Timestamp + 42, // 19: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.intervalEndUTC:type_name -> google.protobuf.Timestamp + 40, // 20: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.values:type_name -> ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.ValuesEntry 21, // [21:21] is the sub-list for method output_type 21, // [21:21] is the sub-list for method input_type 21, // [21:21] is the sub-list for extension type_name @@ -3411,6 +3485,18 @@ func file_mgmt_proto_init() { } } file_mgmt_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mgmt_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamMetricsRequest_MetricMatcher); i { case 0: return &v.state @@ -3422,7 +3508,7 @@ func file_mgmt_proto_init() { return nil } } - file_mgmt_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_mgmt_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamMetricsEvent_IntervalMetric); i { case 0: return &v.state @@ -3434,7 +3520,7 @@ func file_mgmt_proto_init() { return nil } } - file_mgmt_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_mgmt_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InspectResponse_InspectValue); i { case 0: return &v.state @@ -3454,7 +3540,7 @@ func file_mgmt_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_mgmt_proto_rawDesc, NumEnums: 6, - NumMessages: 35, + NumMessages: 36, NumExtensions: 0, NumServices: 0, }, diff --git a/common/pb/mgmt_pb/mgmt.proto b/common/pb/mgmt_pb/mgmt.proto index d8d70c3bf..b7e75b02c 100644 --- a/common/pb/mgmt_pb/mgmt.proto +++ b/common/pb/mgmt_pb/mgmt.proto @@ -44,6 +44,7 @@ enum ContentType { RaftRemovePeerRequestType = 10083; RaftTransferLeadershipRequestType = 10084; RaftInitFromDb = 10085; + RaftInit = 10086; // Validate ValidateTerminatorsRequestType = 10100; @@ -313,4 +314,10 @@ message RouterIdentityConnectionStatusesDetails { string componentName = 3; bool validateSuccess = 4; repeated string errors = 5; +} + +message InitRequest { + string username = 1; + string password = 2; + string name = 3; } \ No newline at end of file diff --git a/controller/agent.go b/controller/agent.go index db204ce40..836344c1d 100644 --- a/controller/agent.go +++ b/controller/agent.go @@ -3,6 +3,7 @@ package controller import ( "fmt" "github.com/openziti/ziti/common/pb/cmd_pb" + "google.golang.org/protobuf/proto" "io" "net" "time" @@ -36,6 +37,7 @@ func (self *Controller) bindAgentChannel(binding channel.Binding) error { binding.AddReceiveHandlerF(int32(mgmt_pb.ContentType_RaftRemovePeerRequestType), self.agentOpRaftRemovePeer) binding.AddReceiveHandlerF(int32(mgmt_pb.ContentType_RaftTransferLeadershipRequestType), self.agentOpRaftTransferLeadership) binding.AddReceiveHandlerF(int32(mgmt_pb.ContentType_RaftInitFromDb), self.agentOpInitFromDb) + binding.AddReceiveHandlerF(int32(mgmt_pb.ContentType_RaftInit), self.agentOpInit) for _, bh := range self.agentBindHandlers { if err := binding.Bind(bh); err != nil { @@ -217,3 +219,27 @@ func (self *Controller) agentOpInitFromDb(m *channel.Message, ch channel.Channel } handler_common.SendOpResult(m, ch, "raft.initFromDb", fmt.Sprintf("success, initialized from [%v]", sourceDbPath), true) } + +func (self *Controller) agentOpInit(m *channel.Message, ch channel.Channel) { + if self.raftController == nil { + handler_common.SendOpResult(m, ch, "raft.list", "controller not running in clustered mode", false) + return + } + + log := pfxlog.Logger().WithField("channel", ch.LogicalName()) + + request := &mgmt_pb.InitRequest{} + if err := proto.Unmarshal(m.Body, request); err != nil { + log.WithError(err).Error("unable to parse InitRequest, closing channel") + if err = ch.Close(); err != nil { + log.WithError(err).Error("error closing mgmt channel") + } + return + } + + if err := self.env.Managers.Identity.InitializeDefaultAdmin(request.Username, request.Password, request.Name); err != nil { + handler_common.SendOpResult(m, ch, "init.edge", err.Error(), false) + } else { + handler_common.SendOpResult(m, ch, "init.edge", "success", true) + } +} diff --git a/controller/controller.go b/controller/controller.go index 1f9a3a455..4de3c340b 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -251,6 +251,12 @@ func NewController(cfg *config.Config, versionProvider versions.VersionProvider) return nil, err } + if c.raftController != nil { + if err = c.raftController.InitEnv(c.env); err != nil { + return nil, err + } + } + c.initWeb() // need to init web before bootstrapping, so we can provide our endpoints to peers if c.raftController != nil && !c.raftController.IsBootstrapped() { @@ -294,7 +300,7 @@ func (c *Controller) initWeb() { logrus.WithError(err).Fatalf("failed to create health checks api factory") } - fabricManagementFactory := webapis.NewFabricManagementApiFactory(c.config.Id, c.network, &c.xmgmts) + fabricManagementFactory := webapis.NewFabricManagementApiFactory(c.config.Id, c.env, c.network, &c.xmgmts) if err = c.xweb.GetRegistry().Add(fabricManagementFactory); err != nil { logrus.WithError(err).Fatalf("failed to create management api factory") } @@ -358,10 +364,6 @@ func (c *Controller) Run() error { int32(ctrl_pb.ControlHeaders_CapabilitiesHeader): capabilityMask.Bytes(), } - if c.raftController != nil { - headers[mesh.PeerAddrHeader] = []byte(c.config.Raft.AdvertiseAddress.String()) - } - /** * ctrl listener/accepter. */ @@ -371,6 +373,11 @@ func (c *Controller) Run() error { Headers: headers, TransportConfig: transport.Configuration{"protocol": "ziti-ctrl"}, } + + if c.raftController != nil { + ctrlChannelListenerConfig.HeadersF = c.raftController.GetListenerHeaders + } + ctrlListener := channel.NewClassicListener(c.config.Id, c.config.Ctrl.Listener, ctrlChannelListenerConfig) c.ctrlListener = ctrlListener if err := c.ctrlListener.Listen(c.ctrlConnectHandler); err != nil { diff --git a/controller/db/db.go b/controller/db/db.go index efcd20e23..665d2e5e5 100644 --- a/controller/db/db.go +++ b/controller/db/db.go @@ -17,6 +17,7 @@ package db import ( + "fmt" "github.com/openziti/storage/boltz" "go.etcd.io/bbolt" ) @@ -25,6 +26,7 @@ const ( RootBucket = "ziti" MetadataBucket = "metadata" FieldRaftIndex = "raftIndex" + FieldClusterId = "clusterId" ) func Open(path string) (boltz.Db, error) { @@ -53,3 +55,31 @@ func LoadCurrentRaftIndex(tx *bbolt.Tx) uint64 { } return 0 } + +func LoadClusterId(db boltz.Db) (string, error) { + var result string + err := db.View(func(tx *bbolt.Tx) error { + raftBucket := boltz.Path(tx, RootBucket, MetadataBucket) + if raftBucket == nil { + return nil + } + result = raftBucket.GetStringWithDefault(FieldClusterId, "") + return nil + }) + return result, err +} + +func InitClusterId(db boltz.Db, ctx boltz.MutateContext, clusterId string) error { + return db.Update(ctx, func(ctx boltz.MutateContext) error { + raftBucket := boltz.GetOrCreatePath(ctx.Tx(), RootBucket, MetadataBucket) + if raftBucket.HasError() { + return raftBucket.Err + } + currentId := raftBucket.GetStringWithDefault(FieldClusterId, "") + if currentId != "" { + return fmt.Errorf("cluster id already initialized to %s", currentId) + } + raftBucket.SetString(FieldClusterId, clusterId, nil) + return raftBucket.Err + }) +} diff --git a/controller/handler_edge_mgmt/init_edge.go b/controller/handler_edge_mgmt/init_edge.go deleted file mode 100644 index 0b78ced2c..000000000 --- a/controller/handler_edge_mgmt/init_edge.go +++ /dev/null @@ -1,59 +0,0 @@ -/* - Copyright NetFoundry Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package handler_edge_mgmt - -import ( - "github.com/michaelquigley/pfxlog" - "github.com/openziti/channel/v3" - "github.com/openziti/ziti/common/handler_common" - "github.com/openziti/ziti/common/pb/edge_mgmt_pb" - "github.com/openziti/ziti/controller/env" - "google.golang.org/protobuf/proto" -) - -type initEdgeHandler struct { - appEnv *env.AppEnv -} - -func NewInitEdgeHandler(appEnv *env.AppEnv) *initEdgeHandler { - return &initEdgeHandler{ - appEnv: appEnv, - } -} - -func (h *initEdgeHandler) ContentType() int32 { - return int32(edge_mgmt_pb.CommandType_InitEdgeType) -} - -func (h *initEdgeHandler) HandleReceive(msg *channel.Message, ch channel.Channel) { - log := pfxlog.Logger().WithField("channel", ch.LogicalName()) - - request := &edge_mgmt_pb.InitEdgeRequest{} - if err := proto.Unmarshal(msg.Body, request); err != nil { - log.WithError(err).Error("unable to parse InitEdgeRequest, closing channel") - if err = ch.Close(); err != nil { - log.WithError(err).Error("error closing mgmt channel") - } - return - } - - if err := h.appEnv.Managers.Identity.InitializeDefaultAdmin(request.Username, request.Password, request.Name); err != nil { - handler_common.SendOpResult(msg, ch, "init.edge", err.Error(), false) - } else { - handler_common.SendOpResult(msg, ch, "init.edge", "success", true) - } -} diff --git a/controller/handler_mgmt/bind.go b/controller/handler_mgmt/bind.go index 589097328..a71057577 100644 --- a/controller/handler_mgmt/bind.go +++ b/controller/handler_mgmt/bind.go @@ -20,16 +20,18 @@ import ( "github.com/openziti/channel/v3" "github.com/openziti/foundation/v2/concurrenz" "github.com/openziti/ziti/common/trace" + "github.com/openziti/ziti/controller/env" "github.com/openziti/ziti/controller/network" "github.com/openziti/ziti/controller/xmgmt" ) type BindHandler struct { + env *env.AppEnv network *network.Network xmgmts *concurrenz.CopyOnWriteSlice[xmgmt.Xmgmt] } -func NewBindHandler(network *network.Network, xmgmts *concurrenz.CopyOnWriteSlice[xmgmt.Xmgmt]) channel.BindHandler { +func NewBindHandler(env *env.AppEnv, network *network.Network, xmgmts *concurrenz.CopyOnWriteSlice[xmgmt.Xmgmt]) channel.BindHandler { return &BindHandler{network: network, xmgmts: xmgmts} } @@ -58,6 +60,18 @@ func (bindHandler *BindHandler) BindChannel(binding channel.Binding) error { Handler: validateSdkTerminatorsRequestHandler.HandleReceive, }) + validateIdentityConnectionStatusesRequestHandler := newValidateIdentityConnectionStatusesHandler(bindHandler.env) + binding.AddTypedReceiveHandler(&channel.AsyncFunctionReceiveAdapter{ + Type: validateIdentityConnectionStatusesRequestHandler.ContentType(), + Handler: validateIdentityConnectionStatusesRequestHandler.HandleReceive, + }) + + validateRouterDataModelRequestHandler := newValidateRouterDataModelHandler(bindHandler.env) + binding.AddTypedReceiveHandler(&channel.AsyncFunctionReceiveAdapter{ + Type: validateRouterDataModelRequestHandler.ContentType(), + Handler: validateRouterDataModelRequestHandler.HandleReceive, + }) + tracesHandler := newStreamTracesHandler(bindHandler.network) binding.AddTypedReceiveHandler(tracesHandler) binding.AddCloseHandler(tracesHandler) diff --git a/controller/handler_edge_mgmt/validate_identity_connection_statuses.go b/controller/handler_mgmt/validate_identity_connection_statuses.go similarity index 98% rename from controller/handler_edge_mgmt/validate_identity_connection_statuses.go rename to controller/handler_mgmt/validate_identity_connection_statuses.go index 784a9ae0f..a50028594 100644 --- a/controller/handler_edge_mgmt/validate_identity_connection_statuses.go +++ b/controller/handler_mgmt/validate_identity_connection_statuses.go @@ -14,7 +14,7 @@ limitations under the License. */ -package handler_edge_mgmt +package handler_mgmt import ( "encoding/json" @@ -40,7 +40,7 @@ type validateIdentityConnectionStatusesHandler struct { appEnv *env.AppEnv } -func NewValidateIdentityConnectionStatusesHandler(appEnv *env.AppEnv) channel.TypedReceiveHandler { +func newValidateIdentityConnectionStatusesHandler(appEnv *env.AppEnv) channel.TypedReceiveHandler { return &validateIdentityConnectionStatusesHandler{appEnv: appEnv} } diff --git a/controller/handler_edge_mgmt/validate_router_data_model.go b/controller/handler_mgmt/validate_router_data_model.go similarity index 98% rename from controller/handler_edge_mgmt/validate_router_data_model.go rename to controller/handler_mgmt/validate_router_data_model.go index 51226a3af..5202d89a5 100644 --- a/controller/handler_edge_mgmt/validate_router_data_model.go +++ b/controller/handler_mgmt/validate_router_data_model.go @@ -14,7 +14,7 @@ limitations under the License. */ -package handler_edge_mgmt +package handler_mgmt import ( "fmt" @@ -33,7 +33,7 @@ type validateRouterDataModelHandler struct { appEnv *env.AppEnv } -func NewValidateRouterDataModelHandler(appEnv *env.AppEnv) channel.TypedReceiveHandler { +func newValidateRouterDataModelHandler(appEnv *env.AppEnv) channel.TypedReceiveHandler { return &validateRouterDataModelHandler{appEnv: appEnv} } diff --git a/controller/network/router_messaging.go b/controller/network/router_messaging.go index 4ae14d5de..f0c8cb150 100644 --- a/controller/network/router_messaging.go +++ b/controller/network/router_messaging.go @@ -327,7 +327,11 @@ func (self *RouterMessaging) sendTerminatorValidationRequest(routerId string, up return } - var req ctrl_pb.FilterableValidateTerminatorsRequest + var req interface { + protobufs.TypedMessage + GetTerminators() []*ctrl_pb.Terminator + } + if !supportsVerifyV2 { req = &ctrl_pb.ValidateTerminatorsRequest{Terminators: terminators} } else { diff --git a/controller/raft/mesh/mesh.go b/controller/raft/mesh/mesh.go index 59d1e6043..2ef286e0b 100644 --- a/controller/raft/mesh/mesh.go +++ b/controller/raft/mesh/mesh.go @@ -40,15 +40,17 @@ import ( ) const ( - PeerAddrHeader = 11 + PeerAddrHeader = 11 + SigningCertHeader = 12 + ApiAddressesHeader = 13 + RaftConnIdHeader = 14 + ClusterIdHeader = 15 RaftConnectType = 2048 RaftDataType = 2049 - SigningCertHeader = 2050 - ApiAddressesHeader = 2051 RaftDisconnectType = 2052 - RaftConnId = 2053 - ChannelTypeMesh = "ctrl.mesh" + + ChannelTypeMesh = "ctrl.mesh" ) type Peer struct { @@ -96,7 +98,7 @@ func (self *Peer) handleReceiveConnect(m *channel.Message, ch channel.Channel) { log := pfxlog.Logger().WithField("peerId", ch.Id()) log.Info("received connect request from raft peer") - id, ok := m.GetUint32Header(RaftConnId) + id, ok := m.GetUint32Header(RaftConnIdHeader) if !ok { response := channel.NewResult(false, "no conn id in connect request") response.ReplyTo(m) @@ -138,7 +140,7 @@ func (self *Peer) handleReceiveDisconnect(m *channel.Message, ch channel.Channel go func() { log := pfxlog.ContextLogger(ch.Label()) - id, ok := m.GetUint32Header(RaftConnId) + id, ok := m.GetUint32Header(RaftConnIdHeader) if !ok { response := channel.NewResult(false, "no conn id in disconnect request") response.ReplyTo(m) @@ -168,7 +170,7 @@ func (self *Peer) handleReceiveDisconnect(m *channel.Message, ch channel.Channel } func (self *Peer) handleReceiveData(m *channel.Message, ch channel.Channel) { - id, ok := m.GetUint32Header(RaftConnId) + id, ok := m.GetUint32Header(RaftConnIdHeader) if !ok { pfxlog.Logger().WithField("peerId", ch.Id()).Error("no conn id in data request") return @@ -190,7 +192,7 @@ func (self *Peer) Connect(timeout time.Duration) (net.Conn, error) { id := self.nextRaftPeerId() msg := channel.NewMessage(RaftConnectType, nil) - msg.Headers.PutUint32Header(RaftConnId, id) + msg.Headers.PutUint32Header(RaftConnIdHeader, id) response, err := msg.WithTimeout(timeout).SendForReply(self.Channel) if err != nil { @@ -230,7 +232,7 @@ func (self *Peer) closeRaftConn(peerConn *raftPeerConn, timeout time.Duration) e log.Info("closed peer connection is current connection, sending disconnect message") msg := channel.NewMessage(RaftDisconnectType, nil) - msg.Headers.PutUint32Header(RaftConnId, peerConn.id) + msg.Headers.PutUint32Header(RaftConnIdHeader, peerConn.id) response, err := msg.WithTimeout(timeout).SendForReply(self.Channel) if err != nil { @@ -275,7 +277,8 @@ const ( ) type Env interface { - GetId() *identity.TokenId + GetNodeId() *identity.TokenId + GetClusterId() string GetVersionProvider() versions.VersionProvider GetEventDispatcher() event.Dispatcher } @@ -307,7 +310,8 @@ func New(env Env, raftAddr raft.ServerAddress, helloHeaderProviders []HeaderProv } return &impl{ - id: env.GetId(), + env: env, + nodeId: env.GetNodeId(), raftAddr: raftAddr, netAddr: &meshAddr{ network: "mesh", @@ -324,7 +328,8 @@ func New(env Env, raftAddr raft.ServerAddress, helloHeaderProviders []HeaderProv } type impl struct { - id *identity.TokenId + env Env + nodeId *identity.TokenId raftAddr raft.ServerAddress netAddr net.Addr Peers map[string]*Peer @@ -410,7 +415,7 @@ func (self *impl) GetOrConnectPeer(address string, timeout time.Duration) (*Peer return nil, err } - tlsCert := self.id.ServerCert() + tlsCert := self.nodeId.ServerCert() var serverCert []byte if len(tlsCert) != 0 && len(tlsCert[0].Certificate) != 0 { serverCert = tlsCert[0].Certificate[0] @@ -421,6 +426,7 @@ func (self *impl) GetOrConnectPeer(address string, timeout time.Duration) (*Peer channel.TypeHeader: []byte(ChannelTypeMesh), PeerAddrHeader: []byte(self.raftAddr), SigningCertHeader: serverCert, + ClusterIdHeader: []byte(self.env.GetClusterId()), } for _, headerProvider := range self.helloHeaderProviders { @@ -428,7 +434,7 @@ func (self *impl) GetOrConnectPeer(address string, timeout time.Duration) (*Peer } dialer := channel.NewClassicDialer(channel.DialerConfig{ - Identity: self.id, + Identity: self.nodeId, Endpoint: addr, Headers: headers, TransportConfig: transport.Configuration{ @@ -454,6 +460,10 @@ func (self *impl) GetOrConnectPeer(address string, timeout time.Duration) (*Peer peer.Channel = binding.GetChannel() + if err = self.checkClusterIds(peer.Channel); err != nil { + return err + } + underlay := binding.GetChannel().Underlay() id, err := self.extractPeerId(underlay.GetRemoteAddr().String(), underlay.Certificates()) if err != nil { @@ -500,6 +510,14 @@ func (self *impl) GetOrConnectPeer(address string, timeout time.Duration) (*Peer return peer, nil } +func (self *impl) checkClusterIds(ch channel.Channel) error { + clusterId := string(ch.Underlay().Headers()[ClusterIdHeader]) + if clusterId != "" && self.env.GetClusterId() != "" && clusterId != self.env.GetClusterId() { + return fmt.Errorf("local cluster id %s doesn't match peer cluster id %s", self.env.GetClusterId(), clusterId) + } + return nil +} + func (self *impl) GetPeerInfo(address string, timeout time.Duration) (raft.ServerID, raft.ServerAddress, error) { log := pfxlog.Logger().WithField("address", address) addr, err := transport.ParseAddress(address) @@ -512,6 +530,7 @@ func (self *impl) GetPeerInfo(address string, timeout time.Duration) (raft.Serve channel.HelloVersionHeader: self.versionEncoded, channel.TypeHeader: []byte(ChannelTypeMesh), PeerAddrHeader: []byte(self.raftAddr), + ClusterIdHeader: []byte(self.env.GetClusterId()), } for _, headerProvider := range self.helloHeaderProviders { @@ -519,7 +538,7 @@ func (self *impl) GetPeerInfo(address string, timeout time.Duration) (raft.Serve } dialer := channel.NewClassicDialer(channel.DialerConfig{ - Identity: self.id, + Identity: self.nodeId, Endpoint: addr, Headers: headers, TransportConfig: transport.Configuration{ @@ -541,6 +560,10 @@ func (self *impl) GetPeerInfo(address string, timeout time.Duration) (raft.Serve return err } + if err = self.checkClusterIds(binding.GetChannel()); err != nil { + return err + } + peerId = raft.ServerID(id) peerAddr = raft.ServerAddress(underlay.Headers()[PeerAddrHeader]) @@ -612,7 +635,7 @@ func (self *impl) PeerConnected(peer *Peer, dial bool) error { DstType: event.ConnectDestinationController, SrcId: string(peer.Id), SrcAddr: srcAddr, - DstId: self.id.Token, + DstId: self.nodeId.Token, DstAddr: dstAddr, Timestamp: time.Now(), } @@ -648,7 +671,7 @@ func (self *impl) GetAllPeersForEvent() []*event.ClusterPeer { } peerList = append(peerList, &Peer{ mesh: self, - Id: raft.ServerID(self.id.Token), + Id: raft.ServerID(self.nodeId.Token), Address: string(self.raftAddr), Version: self.version.AsVersionInfo(), }) @@ -771,6 +794,10 @@ func (self *impl) AcceptUnderlay(underlay channel.Underlay) error { } } + if err = self.checkClusterIds(peer.Channel); err != nil { + return err + } + peer.Version = versionInfo binding.AddReceiveHandlerF(RaftDataType, peer.handleReceiveData) diff --git a/controller/raft/mesh/peerconn.go b/controller/raft/mesh/peerconn.go index 5995e5bdd..28896e787 100644 --- a/controller/raft/mesh/peerconn.go +++ b/controller/raft/mesh/peerconn.go @@ -110,7 +110,7 @@ func (self *raftPeerConn) Write(b []byte) (n int, err error) { } // logrus.Infof("writing %v bytes to raft peer %v", len(b), self.peer.Id) msg := channel.NewMessage(RaftDataType, b) - msg.Headers.PutUint32Header(RaftConnId, self.id) + msg.Headers.PutUint32Header(RaftConnIdHeader, self.id) if deadline := self.writeDeadline; !deadline.IsZero() { now := time.Now() if deadline.After(now) { diff --git a/controller/raft/raft.go b/controller/raft/raft.go index ae97f3bc4..b1cc4fb68 100644 --- a/controller/raft/raft.go +++ b/controller/raft/raft.go @@ -20,14 +20,18 @@ import ( "crypto/x509" "encoding/json" "fmt" + "github.com/google/uuid" "github.com/mitchellh/mapstructure" "github.com/openziti/foundation/v2/concurrenz" "github.com/openziti/foundation/v2/rate" "github.com/openziti/foundation/v2/versions" "github.com/openziti/transport/v2" "github.com/openziti/ziti/common/pb/cmd_pb" + "github.com/openziti/ziti/controller/change" "github.com/openziti/ziti/controller/config" + "github.com/openziti/ziti/controller/db" "github.com/openziti/ziti/controller/event" + "github.com/openziti/ziti/controller/model" "github.com/openziti/ziti/controller/peermsg" "os" "path" @@ -132,6 +136,7 @@ func NewController(env Env, migrationMgr MigrationManager) *Controller { // Controller manages RAFT related state and operations type Controller struct { + clusterId concurrenz.AtomicValue[string] env Env Config *config.RaftConfig Mesh mesh.Mesh @@ -149,6 +154,29 @@ type Controller struct { errorMappers map[string]func(map[string]any) error } +func (self *Controller) GetNodeId() *identity.TokenId { + return self.env.GetId() +} + +func (self *Controller) GetClusterId() string { + return self.clusterId.Load() +} + +func (self *Controller) GetVersionProvider() versions.VersionProvider { + return self.env.GetVersionProvider() +} + +func (self *Controller) GetEventDispatcher() event.Dispatcher { + return self.env.GetEventDispatcher() +} + +func (self *Controller) GetListenerHeaders() map[int32][]byte { + return map[int32][]byte{ + mesh.ClusterIdHeader: []byte(self.clusterId.Load()), + mesh.PeerAddrHeader: []byte(self.Config.AdvertiseAddress.String()), + } +} + func (self *Controller) initErrorMappers() { self.errorMappers[fmt.Sprintf("%T", &boltz.RecordNotFoundError{})] = self.parseBoltzNotFoundError self.errorMappers[fmt.Sprintf("%T", &errorz.FieldError{})] = self.parseFieldError @@ -161,6 +189,16 @@ func (self *Controller) RegisterClusterEventHandler(f func(event ClusterEvent, s self.clusterStateChangeHandlers.Append(f) } +func (self *Controller) InitEnv(env model.Env) error { + model.RegisterCommand(env, &InitClusterIdCmd{}, &cmd_pb.InitClusterIdCommand{}) + clusterId, err := db.LoadClusterId(env.GetDb()) + if err != nil { + return err + } + self.clusterId.Store(clusterId) + return nil +} + // GetRaft returns the managed raft instance func (self *Controller) GetRaft() *raft.Raft { return self.Raft @@ -517,7 +555,7 @@ func (self *Controller) Init() error { helloHeaderProviders := self.env.GetHelloHeaderProviders() - self.Mesh = mesh.New(self.env, localAddr, helloHeaderProviders) + self.Mesh = mesh.New(self, localAddr, helloHeaderProviders) self.Mesh.RegisterClusterStateHandler(func(state mesh.ClusterState) { obs := raft.Observation{ Raft: self.Raft, @@ -707,6 +745,13 @@ func (self *Controller) Bootstrap() error { } go self.addConfiguredInitialMembers() + + self.clusterId.Store(uuid.NewString()) + pfxlog.Logger().WithField("clusterId", self.clusterId.Load()).Info("cluster id initialized") + return self.Dispatch(&InitClusterIdCmd{ + ClusterId: self.clusterId.Load(), + raftController: self, + }) } return nil } @@ -841,3 +886,30 @@ type MigrationManager interface { TryInitializeRaftFromBoltDb() error InitializeRaftFromBoltDb(srcDb string) error } + +type InitClusterIdCmd struct { + ClusterId string `json:"clusterId"` + raftController *Controller +} + +func (self *InitClusterIdCmd) Apply(ctx boltz.MutateContext) error { + self.raftController.clusterId.Store(self.ClusterId) + return db.InitClusterId(self.raftController.Fsm.GetDb(), ctx, self.ClusterId) +} + +func (self *InitClusterIdCmd) Encode() ([]byte, error) { + cmd := &cmd_pb.InitClusterIdCommand{ + ClusterId: self.ClusterId, + } + return cmd_pb.EncodeProtobuf(cmd) +} + +func (self *InitClusterIdCmd) Decode(env model.Env, msg *cmd_pb.InitClusterIdCommand) error { + self.ClusterId = msg.ClusterId + self.raftController = env.GetManagers().Dispatcher.(*Controller) + return nil +} + +func (self *InitClusterIdCmd) GetChangeContext() *change.Context { + return change.New().SetChangeAuthorType(change.AuthorTypeController) +} diff --git a/controller/server/controller.go b/controller/server/controller.go index 1f684e2de..dc74b5146 100644 --- a/controller/server/controller.go +++ b/controller/server/controller.go @@ -26,7 +26,6 @@ import ( edgeconfig "github.com/openziti/ziti/controller/config" "github.com/openziti/ziti/controller/env" "github.com/openziti/ziti/controller/handler_edge_ctrl" - "github.com/openziti/ziti/controller/handler_edge_mgmt" "github.com/openziti/ziti/controller/internal/policy" _ "github.com/openziti/ziti/controller/internal/routes" "github.com/openziti/ziti/controller/model" @@ -39,7 +38,6 @@ import ( type Controller struct { config *edgeconfig.EdgeConfig AppEnv *env.AppEnv - xmgmt *submgmt xctrl *subctrl policyEngine runner2.Runner initModulesOnce sync.Once @@ -81,10 +79,6 @@ func NewController(host env.HostController) (*Controller, error) { c.policyEngine = pe - c.xmgmt = &submgmt{ - parent: c, - } - c.xctrl = &subctrl{ parent: c, } @@ -100,15 +94,6 @@ func NewController(host env.HostController) (*Controller, error) { panic(err) } - if err := host.RegisterXmgmt(c.xmgmt); err != nil { - panic(err) - } - - host.RegisterAgentBindHandler(channel.BindHandlerF(func(binding channel.Binding) error { - binding.AddTypedReceiveHandler(handler_edge_mgmt.NewInitEdgeHandler(c.AppEnv)) - return nil - })) - return c, nil } @@ -146,14 +131,6 @@ func (c *Controller) GetCtrlHandlers(binding channel.Binding) []channel.TypedRec return result } -func (c *Controller) GetMgmtHandlers() []channel.TypedReceiveHandler { - return []channel.TypedReceiveHandler{ - handler_edge_mgmt.NewInitEdgeHandler(c.AppEnv), - handler_edge_mgmt.NewValidateRouterDataModelHandler(c.AppEnv), - handler_edge_mgmt.NewValidateIdentityConnectionStatusesHandler(c.AppEnv), - } -} - func (c *Controller) Enabled() bool { return c.AppEnv.HostController.GetConfig().Edge.Enabled } @@ -341,26 +318,3 @@ func (c *subctrl) BindChannel(binding channel.Binding) error { func (c *subctrl) Run(channel.Channel, boltz.Db, chan struct{}) error { return nil } - -type submgmt struct { - parent *Controller -} - -func (m *submgmt) LoadConfig(map[interface{}]interface{}) error { - return nil -} - -func (m *submgmt) Enabled() bool { - return m.parent.Enabled() -} - -func (m *submgmt) BindChannel(binding channel.Binding) error { - for _, h := range m.parent.GetMgmtHandlers() { - binding.AddTypedReceiveHandler(h) - } - return nil -} - -func (m *submgmt) Run(channel.Channel, chan struct{}) error { - return nil -} diff --git a/controller/webapis/fabric-management-api.go b/controller/webapis/fabric-management-api.go index 3847e448a..f45b233ea 100644 --- a/controller/webapis/fabric-management-api.go +++ b/controller/webapis/fabric-management-api.go @@ -28,6 +28,7 @@ import ( "github.com/openziti/identity" "github.com/openziti/xweb/v2" "github.com/openziti/ziti/controller/api_impl" + "github.com/openziti/ziti/controller/env" "github.com/openziti/ziti/controller/handler_mgmt" "github.com/openziti/ziti/controller/network" "github.com/openziti/ziti/controller/rest_client" @@ -47,6 +48,7 @@ var _ xweb.ApiHandlerFactory = &FabricManagementApiFactory{} type FabricManagementApiFactory struct { InitFunc func(managementApi *FabricManagementApiHandler) error network *network.Network + env *env.AppEnv nodeId identity.Identity xmgmts *concurrenz.CopyOnWriteSlice[xmgmt.Xmgmt] MakeDefault bool @@ -56,9 +58,10 @@ func (factory *FabricManagementApiFactory) Validate(_ *xweb.InstanceConfig) erro return nil } -func NewFabricManagementApiFactory(nodeId identity.Identity, network *network.Network, xmgmts *concurrenz.CopyOnWriteSlice[xmgmt.Xmgmt]) *FabricManagementApiFactory { +func NewFabricManagementApiFactory(nodeId identity.Identity, env *env.AppEnv, network *network.Network, xmgmts *concurrenz.CopyOnWriteSlice[xmgmt.Xmgmt]) *FabricManagementApiFactory { pfxlog.Logger().Infof("initializing management api factory with %d xmgmt instances", len(xmgmts.Value())) return &FabricManagementApiFactory{ + env: env, network: network, nodeId: nodeId, xmgmts: xmgmts, @@ -96,7 +99,7 @@ func (factory *FabricManagementApiFactory) New(_ *xweb.ServerConfig, options map return nil, err } - managementApiHandler.bindHandler = handler_mgmt.NewBindHandler(factory.network, factory.xmgmts) + managementApiHandler.bindHandler = handler_mgmt.NewBindHandler(factory.env, factory.network, factory.xmgmts) if factory.InitFunc != nil { if err := factory.InitFunc(managementApiHandler); err != nil { diff --git a/doc/ha/ctrl1.yml b/doc/ha/ctrl1.yml index 0b502f54e..469101bea 100644 --- a/doc/ha/ctrl1.yml +++ b/doc/ha/ctrl1.yml @@ -1,9 +1,9 @@ v: 3 raft: dataDir: ./data/ctrl1 - initialMembers: - - tls:127.0.0.1:6363 - - tls:127.0.0.1:6464 +# initialMembers: +# - tls:127.0.0.1:6363 +# - tls:127.0.0.1:6464 identity: cert: ./pki/ctrl1/certs/server.chain.pem diff --git a/go.mod b/go.mod index 5efa98763..c88f74b0d 100644 --- a/go.mod +++ b/go.mod @@ -50,7 +50,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/natefinch/lumberjack v2.0.0+incompatible github.com/openziti/agent v1.0.20 - github.com/openziti/channel/v3 v3.0.13 + github.com/openziti/channel/v3 v3.0.14 github.com/openziti/cobra-to-md v1.0.1 github.com/openziti/edge-api v0.26.35 github.com/openziti/foundation/v2 v2.0.52 diff --git a/go.sum b/go.sum index 75a0df9b4..b716c35dd 100644 --- a/go.sum +++ b/go.sum @@ -571,8 +571,8 @@ github.com/openziti-incubator/cf v0.0.3 h1:JKs55DbaIxl87nI/Ra/3DHMiz5iaPpu8JjsuN github.com/openziti-incubator/cf v0.0.3/go.mod h1:6abCY06bCjKmK2I9kohij+cp9uXIPFiFwSCNZPdMk8E= github.com/openziti/agent v1.0.20 h1:Anzbf+xLTdeeOTEpdUQOWu9Lq/zSLfChcyOpHYQRBhE= github.com/openziti/agent v1.0.20/go.mod h1:0MDpC5eu4NXpg84J6M2N3pWEOxbM8DJCqVMYRiIcHzs= -github.com/openziti/channel/v3 v3.0.13 h1:nsbXLxbJpmMvrKDnEh6bStYg110HvMv8LMDligaELtI= -github.com/openziti/channel/v3 v3.0.13/go.mod h1:eU/qMrSx+s4lt+EgkXMXQJ1pUWigSSfJxbCp3EyAfss= +github.com/openziti/channel/v3 v3.0.14 h1:KRLu+oJnX8l2X7LhA0XndOJlR8+WrTYCMANw4cjz8ds= +github.com/openziti/channel/v3 v3.0.14/go.mod h1:eU/qMrSx+s4lt+EgkXMXQJ1pUWigSSfJxbCp3EyAfss= github.com/openziti/cobra-to-md v1.0.1 h1:WRinNoIRmwWUSJm+pSNXMjOrtU48oxXDZgeCYQfVXxE= github.com/openziti/cobra-to-md v1.0.1/go.mod h1:FjCpk/yzHF7/r28oSTNr5P57yN5VolpdAtS/g7KNi2c= github.com/openziti/dilithium v0.3.5 h1:+envGNzxc3OyVPiuvtxivQmCsOjdZjtOMLpQBeMz7eM= diff --git a/ziti/cmd/agentcli/agent_controller_init.go b/ziti/cmd/agentcli/agent_controller_init.go index cc790aadb..b3b659c54 100644 --- a/ziti/cmd/agentcli/agent_controller_init.go +++ b/ziti/cmd/agentcli/agent_controller_init.go @@ -20,7 +20,7 @@ import ( "fmt" "github.com/openziti/channel/v3" "github.com/openziti/channel/v3/protobufs" - "github.com/openziti/ziti/common/pb/edge_mgmt_pb" + "github.com/openziti/ziti/common/pb/mgmt_pb" "github.com/openziti/ziti/ziti/cmd/common" "github.com/spf13/cobra" ) @@ -54,7 +54,7 @@ func NewAgentCtrlInit(p common.OptionsProvider) *cobra.Command { } func (self *AgentCtrlInitOptions) makeRequest(ch channel.Channel) error { - initEdgeRequest := &edge_mgmt_pb.InitEdgeRequest{ + initEdgeRequest := &mgmt_pb.InitRequest{ Username: self.Args[0], Password: self.Args[1], Name: self.Args[2], diff --git a/zititest/go.mod b/zititest/go.mod index a3b41c843..d3915784d 100644 --- a/zititest/go.mod +++ b/zititest/go.mod @@ -11,7 +11,7 @@ require ( github.com/google/uuid v1.6.0 github.com/michaelquigley/pfxlog v0.6.10 github.com/openziti/agent v1.0.20 - github.com/openziti/channel/v3 v3.0.13 + github.com/openziti/channel/v3 v3.0.14 github.com/openziti/edge-api v0.26.35 github.com/openziti/fablab v0.5.72 github.com/openziti/foundation/v2 v2.0.52 diff --git a/zititest/go.sum b/zititest/go.sum index ea07d32ed..d90374cf4 100644 --- a/zititest/go.sum +++ b/zititest/go.sum @@ -593,8 +593,8 @@ github.com/openziti-incubator/cf v0.0.3 h1:JKs55DbaIxl87nI/Ra/3DHMiz5iaPpu8JjsuN github.com/openziti-incubator/cf v0.0.3/go.mod h1:6abCY06bCjKmK2I9kohij+cp9uXIPFiFwSCNZPdMk8E= github.com/openziti/agent v1.0.20 h1:Anzbf+xLTdeeOTEpdUQOWu9Lq/zSLfChcyOpHYQRBhE= github.com/openziti/agent v1.0.20/go.mod h1:0MDpC5eu4NXpg84J6M2N3pWEOxbM8DJCqVMYRiIcHzs= -github.com/openziti/channel/v3 v3.0.13 h1:nsbXLxbJpmMvrKDnEh6bStYg110HvMv8LMDligaELtI= -github.com/openziti/channel/v3 v3.0.13/go.mod h1:eU/qMrSx+s4lt+EgkXMXQJ1pUWigSSfJxbCp3EyAfss= +github.com/openziti/channel/v3 v3.0.14 h1:KRLu+oJnX8l2X7LhA0XndOJlR8+WrTYCMANw4cjz8ds= +github.com/openziti/channel/v3 v3.0.14/go.mod h1:eU/qMrSx+s4lt+EgkXMXQJ1pUWigSSfJxbCp3EyAfss= github.com/openziti/cobra-to-md v1.0.1 h1:WRinNoIRmwWUSJm+pSNXMjOrtU48oxXDZgeCYQfVXxE= github.com/openziti/cobra-to-md v1.0.1/go.mod h1:FjCpk/yzHF7/r28oSTNr5P57yN5VolpdAtS/g7KNi2c= github.com/openziti/dilithium v0.3.5 h1:+envGNzxc3OyVPiuvtxivQmCsOjdZjtOMLpQBeMz7eM=