diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c91da482..b3a6555f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,48 @@ +# Release 0.31.1 + +## What's New + +* SDK Hosting Improvements +* Terminator validation utility + +## SDK Hosting Improvments + +In previous versions of OpenZiti, if many SDK clients were attempting to establish hosting, the controller could get overwhelmed. +In this release, routers will use the rate limiter pool introduced in 0.27.6 when creating terminators on behalf of sdk clients +hosting applications. Additionally, routers now have the ability to verify terminator state with the sdk, if the sdk supports it. +In general, hosting large numbers of services using the sdk should now be less suceptible to thundering herd issues. + +## Manual Terminator Validation + +There is a new CLI command available to validate terminator state. This is primarily a developer tool to validate that terminator +setup logic is correct. However it may also be used to diagnose and resolve issues with production systems, should the need arise. + +``` +ziti fabric validate terminators +``` + +## Component Updates and Bug Fixes + +* github.com/openziti/channel/v2: [v2.0.105 -> v2.0.110](https://github.com/openziti/channel/compare/v2.0.105...v2.0.110) +* github.com/openziti/edge-api: [v0.26.0 -> v0.26.1](https://github.com/openziti/edge-api/compare/v0.26.0...v0.26.1) +* github.com/openziti/foundation/v2: [v2.0.33 -> v2.0.35](https://github.com/openziti/foundation/compare/v2.0.33...v2.0.35) +* github.com/openziti/identity: [v1.0.66 -> v1.0.68](https://github.com/openziti/identity/compare/v1.0.66...v1.0.68) +* github.com/openziti/metrics: [v1.2.37 -> v1.2.40](https://github.com/openziti/metrics/compare/v1.2.37...v1.2.40) +* github.com/openziti/sdk-golang: [v0.20.129 -> v0.20.139](https://github.com/openziti/sdk-golang/compare/v0.20.129...v0.20.139) + * [Issue #457](https://github.com/openziti/sdk-golang/issues/457) - Add inspect support + * [Issue #450](https://github.com/openziti/sdk-golang/issues/450) - Support idempotent terminator creation + +* github.com/openziti/secretstream: [v0.1.13 -> v0.1.14](https://github.com/openziti/secretstream/compare/v0.1.13...v0.1.14) +* github.com/openziti/transport/v2: [v2.0.113 -> v2.0.119](https://github.com/openziti/transport/compare/v2.0.113...v2.0.119) +* github.com/openziti/ziti: [v0.31.0 -> v0.31.1](https://github.com/openziti/ziti/compare/v0.31.0...v0.31.1) + * [Issue #1446](https://github.com/openziti/ziti/issues/1446) - Allow for idempotent sdk based terminators + * [Issue #1523](https://github.com/openziti/ziti/issues/1523) - Bootstrap members not working + * [Issue #1525](https://github.com/openziti/ziti/issues/1525) - Improve cluster list output + * [Issue #1519](https://github.com/openziti/ziti/issues/1519) - Simplify link ack handling + * [Issue #1513](https://github.com/openziti/ziti/issues/1513) - DNS service failure should not cause a router restart + * [Issue #1494](https://github.com/openziti/ziti/issues/1494) - Panic if applying raft log returns nil result + + # Release 0.31.0 ## What's New diff --git a/common/pb/ctrl_pb/ctrl.pb.go b/common/pb/ctrl_pb/ctrl.pb.go index ef42a1738..00dbd4d30 100644 --- a/common/pb/ctrl_pb/ctrl.pb.go +++ b/common/pb/ctrl_pb/ctrl.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 -// protoc v3.19.1 +// protoc v3.21.12 // source: ctrl.proto package ctrl_pb @@ -45,18 +45,20 @@ const ( ContentType_ValidateTerminatorsRequestType ContentType = 1017 ContentType_UpdateTerminatorRequestType ContentType = 1018 // VerifyLinkType = 1019; Unusable since links are now generated by routers - ContentType_SettingsType ContentType = 1020 - ContentType_CircuitConfirmationType ContentType = 1034 - ContentType_RouterLinksType ContentType = 1035 - ContentType_VerifyRouterType ContentType = 1036 - ContentType_UpdateCtrlAddressesType ContentType = 1037 - ContentType_RemoveTerminatorsRequestType ContentType = 1038 - ContentType_QuiesceRouterRequestType ContentType = 1039 - ContentType_DequiesceRouterRequestType ContentType = 1040 - ContentType_PeerStateChangeRequestType ContentType = 1050 - ContentType_ListenersHeader ContentType = 10 - ContentType_RouterMetadataHeader ContentType = 11 - ContentType_CapabilitiesHeader ContentType = 12 + ContentType_SettingsType ContentType = 1020 + ContentType_CircuitConfirmationType ContentType = 1034 + ContentType_RouterLinksType ContentType = 1035 + ContentType_VerifyRouterType ContentType = 1036 + ContentType_UpdateCtrlAddressesType ContentType = 1037 + ContentType_RemoveTerminatorsRequestType ContentType = 1038 + ContentType_QuiesceRouterRequestType ContentType = 1039 + ContentType_DequiesceRouterRequestType ContentType = 1040 + ContentType_ValidateTerminatorsV2RequestType ContentType = 1041 + ContentType_ValidateTerminatorsV2ResponseType ContentType = 1042 + ContentType_PeerStateChangeRequestType ContentType = 1050 + ContentType_ListenersHeader ContentType = 10 + ContentType_RouterMetadataHeader ContentType = 11 + ContentType_CapabilitiesHeader ContentType = 12 ) // Enum value maps for ContentType. @@ -86,40 +88,44 @@ var ( 1038: "RemoveTerminatorsRequestType", 1039: "QuiesceRouterRequestType", 1040: "DequiesceRouterRequestType", + 1041: "ValidateTerminatorsV2RequestType", + 1042: "ValidateTerminatorsV2ResponseType", 1050: "PeerStateChangeRequestType", 10: "ListenersHeader", 11: "RouterMetadataHeader", 12: "CapabilitiesHeader", } ContentType_value = map[string]int32{ - "Zero": 0, - "CircuitRequestType": 1000, - "DialType": 1002, - "LinkConnectedType": 1003, - "FaultType": 1004, - "RouteType": 1005, - "UnrouteType": 1006, - "MetricsType": 1007, - "TogglePipeTracesRequestType": 1008, - "TraceEventType": 1010, - "CreateTerminatorRequestType": 1011, - "RemoveTerminatorRequestType": 1012, - "InspectRequestType": 1013, - "InspectResponseType": 1014, - "ValidateTerminatorsRequestType": 1017, - "UpdateTerminatorRequestType": 1018, - "SettingsType": 1020, - "CircuitConfirmationType": 1034, - "RouterLinksType": 1035, - "VerifyRouterType": 1036, - "UpdateCtrlAddressesType": 1037, - "RemoveTerminatorsRequestType": 1038, - "QuiesceRouterRequestType": 1039, - "DequiesceRouterRequestType": 1040, - "PeerStateChangeRequestType": 1050, - "ListenersHeader": 10, - "RouterMetadataHeader": 11, - "CapabilitiesHeader": 12, + "Zero": 0, + "CircuitRequestType": 1000, + "DialType": 1002, + "LinkConnectedType": 1003, + "FaultType": 1004, + "RouteType": 1005, + "UnrouteType": 1006, + "MetricsType": 1007, + "TogglePipeTracesRequestType": 1008, + "TraceEventType": 1010, + "CreateTerminatorRequestType": 1011, + "RemoveTerminatorRequestType": 1012, + "InspectRequestType": 1013, + "InspectResponseType": 1014, + "ValidateTerminatorsRequestType": 1017, + "UpdateTerminatorRequestType": 1018, + "SettingsType": 1020, + "CircuitConfirmationType": 1034, + "RouterLinksType": 1035, + "VerifyRouterType": 1036, + "UpdateCtrlAddressesType": 1037, + "RemoveTerminatorsRequestType": 1038, + "QuiesceRouterRequestType": 1039, + "DequiesceRouterRequestType": 1040, + "ValidateTerminatorsV2RequestType": 1041, + "ValidateTerminatorsV2ResponseType": 1042, + "PeerStateChangeRequestType": 1050, + "ListenersHeader": 10, + "RouterMetadataHeader": 11, + "CapabilitiesHeader": 12, } ) @@ -295,6 +301,55 @@ func (TerminatorPrecedence) EnumDescriptor() ([]byte, []int) { return file_ctrl_proto_rawDescGZIP(), []int{3} } +type TerminatorInvalidReason int32 + +const ( + TerminatorInvalidReason_UnknownBinding TerminatorInvalidReason = 0 + TerminatorInvalidReason_UnknownTerminator TerminatorInvalidReason = 1 + TerminatorInvalidReason_BadState TerminatorInvalidReason = 2 +) + +// Enum value maps for TerminatorInvalidReason. +var ( + TerminatorInvalidReason_name = map[int32]string{ + 0: "UnknownBinding", + 1: "UnknownTerminator", + 2: "BadState", + } + TerminatorInvalidReason_value = map[string]int32{ + "UnknownBinding": 0, + "UnknownTerminator": 1, + "BadState": 2, + } +) + +func (x TerminatorInvalidReason) Enum() *TerminatorInvalidReason { + p := new(TerminatorInvalidReason) + *p = x + return p +} + +func (x TerminatorInvalidReason) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TerminatorInvalidReason) Descriptor() protoreflect.EnumDescriptor { + return file_ctrl_proto_enumTypes[4].Descriptor() +} + +func (TerminatorInvalidReason) Type() protoreflect.EnumType { + return &file_ctrl_proto_enumTypes[4] +} + +func (x TerminatorInvalidReason) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TerminatorInvalidReason.Descriptor instead. +func (TerminatorInvalidReason) EnumDescriptor() ([]byte, []int) { + return file_ctrl_proto_rawDescGZIP(), []int{4} +} + type FaultSubject int32 const ( @@ -337,11 +392,11 @@ func (x FaultSubject) String() string { } func (FaultSubject) Descriptor() protoreflect.EnumDescriptor { - return file_ctrl_proto_enumTypes[4].Descriptor() + return file_ctrl_proto_enumTypes[5].Descriptor() } func (FaultSubject) Type() protoreflect.EnumType { - return &file_ctrl_proto_enumTypes[4] + return &file_ctrl_proto_enumTypes[5] } func (x FaultSubject) Number() protoreflect.EnumNumber { @@ -350,7 +405,7 @@ func (x FaultSubject) Number() protoreflect.EnumNumber { // Deprecated: Use FaultSubject.Descriptor instead. func (FaultSubject) EnumDescriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{4} + return file_ctrl_proto_rawDescGZIP(), []int{5} } type DestType int32 @@ -386,11 +441,11 @@ func (x DestType) String() string { } func (DestType) Descriptor() protoreflect.EnumDescriptor { - return file_ctrl_proto_enumTypes[5].Descriptor() + return file_ctrl_proto_enumTypes[6].Descriptor() } func (DestType) Type() protoreflect.EnumType { - return &file_ctrl_proto_enumTypes[5] + return &file_ctrl_proto_enumTypes[6] } func (x DestType) Number() protoreflect.EnumNumber { @@ -399,7 +454,7 @@ func (x DestType) Number() protoreflect.EnumNumber { // Deprecated: Use DestType.Descriptor instead. func (DestType) EnumDescriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{5} + return file_ctrl_proto_rawDescGZIP(), []int{6} } type PeerState int32 @@ -435,11 +490,11 @@ func (x PeerState) String() string { } func (PeerState) Descriptor() protoreflect.EnumDescriptor { - return file_ctrl_proto_enumTypes[6].Descriptor() + return file_ctrl_proto_enumTypes[7].Descriptor() } func (PeerState) Type() protoreflect.EnumType { - return &file_ctrl_proto_enumTypes[6] + return &file_ctrl_proto_enumTypes[7] } func (x PeerState) Number() protoreflect.EnumNumber { @@ -448,7 +503,7 @@ func (x PeerState) Number() protoreflect.EnumNumber { // Deprecated: Use PeerState.Descriptor instead. func (PeerState) EnumDescriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{6} + return file_ctrl_proto_rawDescGZIP(), []int{7} } // Settings are sent to to routers to configure arbitrary runtime settings. @@ -916,6 +971,171 @@ func (x *ValidateTerminatorsRequest) GetTerminators() []*Terminator { return nil } +type ValidateTerminatorsV2Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Terminators []*Terminator `protobuf:"bytes,1,rep,name=terminators,proto3" json:"terminators,omitempty"` + FixInvalid bool `protobuf:"varint,2,opt,name=fixInvalid,proto3" json:"fixInvalid,omitempty"` +} + +func (x *ValidateTerminatorsV2Request) Reset() { + *x = ValidateTerminatorsV2Request{} + if protoimpl.UnsafeEnabled { + mi := &file_ctrl_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateTerminatorsV2Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateTerminatorsV2Request) ProtoMessage() {} + +func (x *ValidateTerminatorsV2Request) ProtoReflect() protoreflect.Message { + mi := &file_ctrl_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 ValidateTerminatorsV2Request.ProtoReflect.Descriptor instead. +func (*ValidateTerminatorsV2Request) Descriptor() ([]byte, []int) { + return file_ctrl_proto_rawDescGZIP(), []int{8} +} + +func (x *ValidateTerminatorsV2Request) GetTerminators() []*Terminator { + if x != nil { + return x.Terminators + } + return nil +} + +func (x *ValidateTerminatorsV2Request) GetFixInvalid() bool { + if x != nil { + return x.FixInvalid + } + return false +} + +type RouterTerminatorState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` + Reason TerminatorInvalidReason `protobuf:"varint,2,opt,name=reason,proto3,enum=ziti.ctrl.pb.TerminatorInvalidReason" json:"reason,omitempty"` + Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"` // inspect info if valid +} + +func (x *RouterTerminatorState) Reset() { + *x = RouterTerminatorState{} + if protoimpl.UnsafeEnabled { + mi := &file_ctrl_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RouterTerminatorState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RouterTerminatorState) ProtoMessage() {} + +func (x *RouterTerminatorState) ProtoReflect() protoreflect.Message { + mi := &file_ctrl_proto_msgTypes[9] + 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 RouterTerminatorState.ProtoReflect.Descriptor instead. +func (*RouterTerminatorState) Descriptor() ([]byte, []int) { + return file_ctrl_proto_rawDescGZIP(), []int{9} +} + +func (x *RouterTerminatorState) GetValid() bool { + if x != nil { + return x.Valid + } + return false +} + +func (x *RouterTerminatorState) GetReason() TerminatorInvalidReason { + if x != nil { + return x.Reason + } + return TerminatorInvalidReason_UnknownBinding +} + +func (x *RouterTerminatorState) GetDetail() string { + if x != nil { + return x.Detail + } + return "" +} + +type ValidateTerminatorsV2Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + States map[string]*RouterTerminatorState `protobuf:"bytes,1,rep,name=states,proto3" json:"states,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ValidateTerminatorsV2Response) Reset() { + *x = ValidateTerminatorsV2Response{} + if protoimpl.UnsafeEnabled { + mi := &file_ctrl_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateTerminatorsV2Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateTerminatorsV2Response) ProtoMessage() {} + +func (x *ValidateTerminatorsV2Response) ProtoReflect() protoreflect.Message { + mi := &file_ctrl_proto_msgTypes[10] + 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 ValidateTerminatorsV2Response.ProtoReflect.Descriptor instead. +func (*ValidateTerminatorsV2Response) Descriptor() ([]byte, []int) { + return file_ctrl_proto_rawDescGZIP(), []int{10} +} + +func (x *ValidateTerminatorsV2Response) GetStates() map[string]*RouterTerminatorState { + if x != nil { + return x.States + } + return nil +} + type UpdateTerminatorRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -931,7 +1151,7 @@ type UpdateTerminatorRequest struct { func (x *UpdateTerminatorRequest) Reset() { *x = UpdateTerminatorRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[8] + mi := &file_ctrl_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -944,7 +1164,7 @@ func (x *UpdateTerminatorRequest) String() string { func (*UpdateTerminatorRequest) ProtoMessage() {} func (x *UpdateTerminatorRequest) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[8] + mi := &file_ctrl_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -957,7 +1177,7 @@ func (x *UpdateTerminatorRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateTerminatorRequest.ProtoReflect.Descriptor instead. func (*UpdateTerminatorRequest) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{8} + return file_ctrl_proto_rawDescGZIP(), []int{11} } func (x *UpdateTerminatorRequest) GetTerminatorId() string { @@ -1010,7 +1230,7 @@ type Dial struct { func (x *Dial) Reset() { *x = Dial{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[9] + mi := &file_ctrl_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1023,7 +1243,7 @@ func (x *Dial) String() string { func (*Dial) ProtoMessage() {} func (x *Dial) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[9] + mi := &file_ctrl_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1036,7 +1256,7 @@ func (x *Dial) ProtoReflect() protoreflect.Message { // Deprecated: Use Dial.ProtoReflect.Descriptor instead. func (*Dial) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{9} + return file_ctrl_proto_rawDescGZIP(), []int{12} } func (x *Dial) GetLinkId() string { @@ -1087,7 +1307,7 @@ type LinkConn struct { func (x *LinkConn) Reset() { *x = LinkConn{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[10] + mi := &file_ctrl_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1100,7 +1320,7 @@ func (x *LinkConn) String() string { func (*LinkConn) ProtoMessage() {} func (x *LinkConn) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[10] + mi := &file_ctrl_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1113,7 +1333,7 @@ func (x *LinkConn) ProtoReflect() protoreflect.Message { // Deprecated: Use LinkConn.ProtoReflect.Descriptor instead. func (*LinkConn) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{10} + return file_ctrl_proto_rawDescGZIP(), []int{13} } func (x *LinkConn) GetId() string { @@ -1149,7 +1369,7 @@ type LinkConnected struct { func (x *LinkConnected) Reset() { *x = LinkConnected{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[11] + mi := &file_ctrl_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1162,7 +1382,7 @@ func (x *LinkConnected) String() string { func (*LinkConnected) ProtoMessage() {} func (x *LinkConnected) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[11] + mi := &file_ctrl_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1175,7 +1395,7 @@ func (x *LinkConnected) ProtoReflect() protoreflect.Message { // Deprecated: Use LinkConnected.ProtoReflect.Descriptor instead. func (*LinkConnected) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{11} + return file_ctrl_proto_rawDescGZIP(), []int{14} } func (x *LinkConnected) GetId() string { @@ -1203,7 +1423,7 @@ type RouterLinks struct { func (x *RouterLinks) Reset() { *x = RouterLinks{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[12] + mi := &file_ctrl_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1216,7 +1436,7 @@ func (x *RouterLinks) String() string { func (*RouterLinks) ProtoMessage() {} func (x *RouterLinks) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[12] + mi := &file_ctrl_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1229,7 +1449,7 @@ func (x *RouterLinks) ProtoReflect() protoreflect.Message { // Deprecated: Use RouterLinks.ProtoReflect.Descriptor instead. func (*RouterLinks) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{12} + return file_ctrl_proto_rawDescGZIP(), []int{15} } func (x *RouterLinks) GetLinks() []*RouterLinks_RouterLink { @@ -1251,7 +1471,7 @@ type Fault struct { func (x *Fault) Reset() { *x = Fault{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[13] + mi := &file_ctrl_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1264,7 +1484,7 @@ func (x *Fault) String() string { func (*Fault) ProtoMessage() {} func (x *Fault) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[13] + mi := &file_ctrl_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1277,7 +1497,7 @@ func (x *Fault) ProtoReflect() protoreflect.Message { // Deprecated: Use Fault.ProtoReflect.Descriptor instead. func (*Fault) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{13} + return file_ctrl_proto_rawDescGZIP(), []int{16} } func (x *Fault) GetSubject() FaultSubject { @@ -1306,7 +1526,7 @@ type Context struct { func (x *Context) Reset() { *x = Context{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[14] + mi := &file_ctrl_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1319,7 +1539,7 @@ func (x *Context) String() string { func (*Context) ProtoMessage() {} func (x *Context) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[14] + mi := &file_ctrl_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1332,7 +1552,7 @@ func (x *Context) ProtoReflect() protoreflect.Message { // Deprecated: Use Context.ProtoReflect.Descriptor instead. func (*Context) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{14} + return file_ctrl_proto_rawDescGZIP(), []int{17} } func (x *Context) GetFields() map[string]string { @@ -1366,7 +1586,7 @@ type Route struct { func (x *Route) Reset() { *x = Route{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[15] + mi := &file_ctrl_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1379,7 +1599,7 @@ func (x *Route) String() string { func (*Route) ProtoMessage() {} func (x *Route) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[15] + mi := &file_ctrl_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1392,7 +1612,7 @@ func (x *Route) ProtoReflect() protoreflect.Message { // Deprecated: Use Route.ProtoReflect.Descriptor instead. func (*Route) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{15} + return file_ctrl_proto_rawDescGZIP(), []int{18} } func (x *Route) GetCircuitId() string { @@ -1456,7 +1676,7 @@ type Unroute struct { func (x *Unroute) Reset() { *x = Unroute{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[16] + mi := &file_ctrl_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1469,7 +1689,7 @@ func (x *Unroute) String() string { func (*Unroute) ProtoMessage() {} func (x *Unroute) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[16] + mi := &file_ctrl_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1482,7 +1702,7 @@ func (x *Unroute) ProtoReflect() protoreflect.Message { // Deprecated: Use Unroute.ProtoReflect.Descriptor instead. func (*Unroute) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{16} + return file_ctrl_proto_rawDescGZIP(), []int{19} } func (x *Unroute) GetCircuitId() string { @@ -1510,7 +1730,7 @@ type InspectRequest struct { func (x *InspectRequest) Reset() { *x = InspectRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[17] + mi := &file_ctrl_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1523,7 +1743,7 @@ func (x *InspectRequest) String() string { func (*InspectRequest) ProtoMessage() {} func (x *InspectRequest) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[17] + mi := &file_ctrl_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1536,7 +1756,7 @@ func (x *InspectRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use InspectRequest.ProtoReflect.Descriptor instead. func (*InspectRequest) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{17} + return file_ctrl_proto_rawDescGZIP(), []int{20} } func (x *InspectRequest) GetRequestedValues() []string { @@ -1559,7 +1779,7 @@ type InspectResponse struct { func (x *InspectResponse) Reset() { *x = InspectResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[18] + mi := &file_ctrl_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1572,7 +1792,7 @@ func (x *InspectResponse) String() string { func (*InspectResponse) ProtoMessage() {} func (x *InspectResponse) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[18] + mi := &file_ctrl_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1585,7 +1805,7 @@ func (x *InspectResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use InspectResponse.ProtoReflect.Descriptor instead. func (*InspectResponse) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{18} + return file_ctrl_proto_rawDescGZIP(), []int{21} } func (x *InspectResponse) GetSuccess() bool { @@ -1621,7 +1841,7 @@ type VerifyRouter struct { func (x *VerifyRouter) Reset() { *x = VerifyRouter{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[19] + mi := &file_ctrl_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1634,7 +1854,7 @@ func (x *VerifyRouter) String() string { func (*VerifyRouter) ProtoMessage() {} func (x *VerifyRouter) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[19] + mi := &file_ctrl_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1647,7 +1867,7 @@ func (x *VerifyRouter) ProtoReflect() protoreflect.Message { // Deprecated: Use VerifyRouter.ProtoReflect.Descriptor instead. func (*VerifyRouter) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{19} + return file_ctrl_proto_rawDescGZIP(), []int{22} } func (x *VerifyRouter) GetRouterId() string { @@ -1679,7 +1899,7 @@ type Listener struct { func (x *Listener) Reset() { *x = Listener{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[20] + mi := &file_ctrl_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1692,7 +1912,7 @@ func (x *Listener) String() string { func (*Listener) ProtoMessage() {} func (x *Listener) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[20] + mi := &file_ctrl_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1705,7 +1925,7 @@ func (x *Listener) ProtoReflect() protoreflect.Message { // Deprecated: Use Listener.ProtoReflect.Descriptor instead. func (*Listener) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{20} + return file_ctrl_proto_rawDescGZIP(), []int{23} } func (x *Listener) GetAddress() string { @@ -1754,7 +1974,7 @@ type Listeners struct { func (x *Listeners) Reset() { *x = Listeners{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[21] + mi := &file_ctrl_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1767,7 +1987,7 @@ func (x *Listeners) String() string { func (*Listeners) ProtoMessage() {} func (x *Listeners) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[21] + mi := &file_ctrl_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1780,7 +2000,7 @@ func (x *Listeners) ProtoReflect() protoreflect.Message { // Deprecated: Use Listeners.ProtoReflect.Descriptor instead. func (*Listeners) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{21} + return file_ctrl_proto_rawDescGZIP(), []int{24} } func (x *Listeners) GetListeners() []*Listener { @@ -1803,7 +2023,7 @@ type UpdateCtrlAddresses struct { func (x *UpdateCtrlAddresses) Reset() { *x = UpdateCtrlAddresses{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[22] + mi := &file_ctrl_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1816,7 +2036,7 @@ func (x *UpdateCtrlAddresses) String() string { func (*UpdateCtrlAddresses) ProtoMessage() {} func (x *UpdateCtrlAddresses) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[22] + mi := &file_ctrl_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1829,7 +2049,7 @@ func (x *UpdateCtrlAddresses) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateCtrlAddresses.ProtoReflect.Descriptor instead. func (*UpdateCtrlAddresses) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{22} + return file_ctrl_proto_rawDescGZIP(), []int{25} } func (x *UpdateCtrlAddresses) GetAddresses() []string { @@ -1867,7 +2087,7 @@ type PeerStateChange struct { func (x *PeerStateChange) Reset() { *x = PeerStateChange{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[23] + mi := &file_ctrl_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1880,7 +2100,7 @@ func (x *PeerStateChange) String() string { func (*PeerStateChange) ProtoMessage() {} func (x *PeerStateChange) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[23] + mi := &file_ctrl_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1893,7 +2113,7 @@ func (x *PeerStateChange) ProtoReflect() protoreflect.Message { // Deprecated: Use PeerStateChange.ProtoReflect.Descriptor instead. func (*PeerStateChange) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{23} + return file_ctrl_proto_rawDescGZIP(), []int{26} } func (x *PeerStateChange) GetId() string { @@ -1935,7 +2155,7 @@ type PeerStateChanges struct { func (x *PeerStateChanges) Reset() { *x = PeerStateChanges{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[24] + mi := &file_ctrl_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1948,7 +2168,7 @@ func (x *PeerStateChanges) String() string { func (*PeerStateChanges) ProtoMessage() {} func (x *PeerStateChanges) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[24] + mi := &file_ctrl_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1961,7 +2181,7 @@ func (x *PeerStateChanges) ProtoReflect() protoreflect.Message { // Deprecated: Use PeerStateChanges.ProtoReflect.Descriptor instead. func (*PeerStateChanges) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{24} + return file_ctrl_proto_rawDescGZIP(), []int{27} } func (x *PeerStateChanges) GetChanges() []*PeerStateChange { @@ -1982,7 +2202,7 @@ type RouterMetadata struct { func (x *RouterMetadata) Reset() { *x = RouterMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[25] + mi := &file_ctrl_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1995,7 +2215,7 @@ func (x *RouterMetadata) String() string { func (*RouterMetadata) ProtoMessage() {} func (x *RouterMetadata) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[25] + mi := &file_ctrl_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2008,7 +2228,7 @@ func (x *RouterMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use RouterMetadata.ProtoReflect.Descriptor instead. func (*RouterMetadata) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{25} + return file_ctrl_proto_rawDescGZIP(), []int{28} } func (x *RouterMetadata) GetCapabilities() []RouterCapability { @@ -2033,7 +2253,7 @@ type RouterLinks_RouterLink struct { func (x *RouterLinks_RouterLink) Reset() { *x = RouterLinks_RouterLink{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[29] + mi := &file_ctrl_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2046,7 +2266,7 @@ func (x *RouterLinks_RouterLink) String() string { func (*RouterLinks_RouterLink) ProtoMessage() {} func (x *RouterLinks_RouterLink) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[29] + mi := &file_ctrl_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2059,7 +2279,7 @@ func (x *RouterLinks_RouterLink) ProtoReflect() protoreflect.Message { // Deprecated: Use RouterLinks_RouterLink.ProtoReflect.Descriptor instead. func (*RouterLinks_RouterLink) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{12, 0} + return file_ctrl_proto_rawDescGZIP(), []int{15, 0} } func (x *RouterLinks_RouterLink) GetId() string { @@ -2111,7 +2331,7 @@ type Route_Egress struct { func (x *Route_Egress) Reset() { *x = Route_Egress{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[31] + mi := &file_ctrl_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2124,7 +2344,7 @@ func (x *Route_Egress) String() string { func (*Route_Egress) ProtoMessage() {} func (x *Route_Egress) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[31] + mi := &file_ctrl_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2137,7 +2357,7 @@ func (x *Route_Egress) ProtoReflect() protoreflect.Message { // Deprecated: Use Route_Egress.ProtoReflect.Descriptor instead. func (*Route_Egress) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{15, 0} + return file_ctrl_proto_rawDescGZIP(), []int{18, 0} } func (x *Route_Egress) GetBinding() string { @@ -2181,7 +2401,7 @@ type Route_Forward struct { func (x *Route_Forward) Reset() { *x = Route_Forward{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[32] + mi := &file_ctrl_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2194,7 +2414,7 @@ func (x *Route_Forward) String() string { func (*Route_Forward) ProtoMessage() {} func (x *Route_Forward) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[32] + mi := &file_ctrl_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2207,7 +2427,7 @@ func (x *Route_Forward) ProtoReflect() protoreflect.Message { // Deprecated: Use Route_Forward.ProtoReflect.Descriptor instead. func (*Route_Forward) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{15, 1} + return file_ctrl_proto_rawDescGZIP(), []int{18, 1} } func (x *Route_Forward) GetSrcAddress() string { @@ -2243,7 +2463,7 @@ type InspectResponse_InspectValue struct { func (x *InspectResponse_InspectValue) Reset() { *x = InspectResponse_InspectValue{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[35] + mi := &file_ctrl_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2256,7 +2476,7 @@ func (x *InspectResponse_InspectValue) String() string { func (*InspectResponse_InspectValue) ProtoMessage() {} func (x *InspectResponse_InspectValue) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[35] + mi := &file_ctrl_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2269,7 +2489,7 @@ func (x *InspectResponse_InspectValue) ProtoReflect() protoreflect.Message { // Deprecated: Use InspectResponse_InspectValue.ProtoReflect.Descriptor instead. func (*InspectResponse_InspectValue) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{18, 0} + return file_ctrl_proto_rawDescGZIP(), []int{21, 0} } func (x *InspectResponse_InspectValue) GetName() string { @@ -2359,256 +2579,296 @@ var file_ctrl_proto_rawDesc = []byte{ 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0b, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x61, 0x74, 0x6f, 0x72, 0x73, 0x22, 0xe1, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x49, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, - 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, - 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x73, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x73, - 0x74, 0x12, 0x42, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, - 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x63, 0x65, - 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x22, 0x9e, 0x01, 0x0a, 0x04, 0x44, 0x69, - 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x69, 0x6e, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6c, 0x69, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 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, 0x22, 0x0a, 0x0c, 0x6c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x58, 0x0a, 0x08, 0x4c, 0x69, - 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x41, - 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x41, 0x64, 0x64, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, - 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, - 0x41, 0x64, 0x64, 0x72, 0x22, 0x4d, 0x0a, 0x0d, 0x4c, 0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, - 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x52, 0x05, 0x63, 0x6f, - 0x6e, 0x6e, 0x73, 0x22, 0xf6, 0x01, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4c, 0x69, - 0x6e, 0x6b, 0x73, 0x12, 0x3a, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, - 0x62, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x2e, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x1a, - 0xaa, 0x01, 0x0a, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, - 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x69, 0x6e, 0x6b, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x69, 0x6e, 0x6b, 0x43, 0x6f, - 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x69, - 0x6e, 0x6b, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x69, - 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x69, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x4d, 0x0a, 0x05, - 0x46, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, - 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xa1, 0x01, 0x0a, 0x07, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x39, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, - 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4d, 0x61, 0x73, - 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x4d, 0x61, 0x73, 0x6b, 0x1a, 0x39, 0x0a, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0xc4, 0x05, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x69, 0x72, - 0x63, 0x75, 0x69, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x69, - 0x72, 0x63, 0x75, 0x69, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x74, 0x74, 0x65, 0x6d, - 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, - 0x74, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, - 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x06, 0x65, - 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, - 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x46, 0x6f, 0x72, - 0x77, 0x61, 0x72, 0x64, 0x52, 0x08, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x2f, - 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, - 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x61, 0x67, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, - 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x54, 0x61, 0x67, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x1a, 0xe1, 0x01, 0x0a, - 0x06, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x18, 0x01, 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, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, - 0x08, 0x70, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x50, 0x65, 0x65, 0x72, - 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, 0x44, - 0x61, 0x74, 0x61, 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, 0x7b, 0x0a, 0x07, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, - 0x72, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x73, 0x72, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x64, - 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x64, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x07, 0x64, - 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x7a, - 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x73, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x64, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x37, 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, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x39, 0x0a, 0x07, 0x55, 0x6e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x49, 0x64, 0x12, - 0x10, 0x0a, 0x03, 0x6e, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x6e, 0x6f, - 0x77, 0x22, 0x3a, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0xc1, 0x01, - 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x73, 0x12, 0x42, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, - 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x38, 0x0a, 0x0c, 0x49, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x74, 0x6f, 0x72, 0x73, 0x22, 0x7a, 0x0a, 0x1c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x56, 0x32, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x0b, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, + 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x7a, 0x69, 0x74, + 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0b, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x78, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x66, 0x69, 0x78, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x22, 0x84, 0x01, 0x0a, 0x15, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x54, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x12, 0x3d, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x25, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, + 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x22, 0xd0, 0x01, 0x0a, 0x1d, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, + 0x56, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x7a, 0x69, 0x74, + 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x56, 0x32, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x5e, 0x0a, 0x0b, 0x53, + 0x74, 0x61, 0x74, 0x65, 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, 0x39, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x7a, 0x69, + 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x72, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe1, 0x01, 0x0a, 0x17, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, + 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x65, + 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x63, 0x65, + 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x7a, 0x69, + 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x52, + 0x0a, 0x70, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, + 0x6f, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x22, + 0x9e, 0x01, 0x0a, 0x04, 0x44, 0x69, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x69, 0x6e, 0x6b, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x69, 0x6e, 0x6b, 0x49, 0x64, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 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, 0x22, 0x0a, 0x0c, 0x6c, 0x69, 0x6e, 0x6b, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x69, + 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0x58, 0x0a, 0x08, 0x4c, 0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x22, 0x4d, 0x0a, 0x0d, 0x4c, 0x69, + 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x05, 0x63, + 0x6f, 0x6e, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x7a, 0x69, 0x74, + 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x43, 0x6f, + 0x6e, 0x6e, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x6e, 0x73, 0x22, 0xf6, 0x01, 0x0a, 0x0b, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x3a, 0x0a, 0x05, 0x6c, 0x69, 0x6e, + 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, + 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4c, 0x69, + 0x6e, 0x6b, 0x73, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x05, + 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x1a, 0xaa, 0x01, 0x0a, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x69, 0x6e, 0x6b, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x6c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x22, 0x0a, 0x0c, + 0x6c, 0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, + 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0x4d, 0x0a, 0x05, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x34, 0x0a, 0x07, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x7a, + 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x61, 0x75, 0x6c, + 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0xa1, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x39, 0x0a, + 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x4d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4d, 0x61, 0x73, 0x6b, 0x1a, 0x39, 0x0a, 0x0b, 0x46, 0x69, + 0x65, 0x6c, 0x64, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0x4e, 0x0a, 0x0c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, - 0x0c, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, - 0x73, 0x22, 0x98, 0x01, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x18, - 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x41, 0x0a, 0x09, - 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, 0x09, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x7a, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc4, 0x05, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, + 0x07, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, + 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, + 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x45, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x52, 0x06, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, + 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x52, 0x08, 0x66, 0x6f, 0x72, 0x77, + 0x61, 0x72, 0x64, 0x73, 0x12, 0x2f, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, + 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, + 0x31, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, + 0x67, 0x73, 0x1a, 0xe1, 0x01, 0x0a, 0x06, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, + 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x01, 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, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x08, 0x70, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, + 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x45, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x08, 0x70, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 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, 0x7b, 0x0a, 0x07, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, + 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x72, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x72, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x30, 0x0a, 0x07, 0x64, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, + 0x62, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x64, 0x73, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x1a, 0x37, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x39, 0x0a, 0x07, + 0x55, 0x6e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x69, 0x72, 0x63, 0x75, + 0x69, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x69, 0x72, 0x63, + 0x75, 0x69, 0x74, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x03, 0x6e, 0x6f, 0x77, 0x22, 0x3a, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x22, 0xc1, 0x01, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x42, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x7a, 0x69, 0x74, 0x69, + 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x38, 0x0a, + 0x0c, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4e, 0x0a, 0x0c, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, + 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x69, 0x6e, 0x67, 0x65, + 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, + 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, + 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x22, + 0x0a, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x42, 0x69, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x22, 0x41, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, + 0x34, 0x0a, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, + 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x09, 0x6c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x65, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x74, 0x72, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xa0, 0x01, 0x0a, + 0x0f, 0x50, 0x65, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x7a, 0x69, 0x74, 0x69, + 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x22, - 0x65, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x74, 0x72, 0x6c, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, - 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, - 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xa0, 0x01, 0x0a, 0x0f, 0x50, 0x65, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, - 0x70, 0x62, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, - 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x09, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x4b, 0x0a, 0x10, 0x50, 0x65, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x37, 0x0a, - 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, - 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65, - 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x07, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x54, 0x0a, 0x0e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1e, - 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0c, - 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2a, 0xd7, 0x05, 0x0a, - 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, - 0x5a, 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x12, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xe8, 0x07, 0x12, - 0x0d, 0x0a, 0x08, 0x44, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x10, 0xea, 0x07, 0x12, 0x16, - 0x0a, 0x11, 0x4c, 0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x54, - 0x79, 0x70, 0x65, 0x10, 0xeb, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x10, 0xec, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x10, 0xed, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x55, 0x6e, 0x72, 0x6f, 0x75, 0x74, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xee, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x54, 0x79, 0x70, 0x65, 0x10, 0xef, 0x07, 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, 0xf0, 0x07, 0x12, 0x13, 0x0a, 0x0e, - 0x54, 0x72, 0x61, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf2, - 0x07, 0x12, 0x20, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x10, 0xf3, 0x07, 0x12, 0x20, 0x0a, 0x1b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x72, + 0x4b, 0x0a, 0x10, 0x50, 0x65, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, + 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x54, 0x0a, 0x0e, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x42, + 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, + 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x2a, 0xa6, 0x06, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x5a, 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x12, + 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x10, 0xe8, 0x07, 0x12, 0x0d, 0x0a, 0x08, 0x44, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, + 0x65, 0x10, 0xea, 0x07, 0x12, 0x16, 0x0a, 0x11, 0x4c, 0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x10, 0xeb, 0x07, 0x12, 0x0e, 0x0a, 0x09, + 0x46, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xec, 0x07, 0x12, 0x0e, 0x0a, 0x09, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xed, 0x07, 0x12, 0x10, 0x0a, 0x0b, + 0x55, 0x6e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xee, 0x07, 0x12, 0x10, + 0x0a, 0x0b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x54, 0x79, 0x70, 0x65, 0x10, 0xef, 0x07, + 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, + 0xf0, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x10, 0xf2, 0x07, 0x12, 0x20, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf3, 0x07, 0x12, 0x20, 0x0a, 0x1b, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf4, 0x07, 0x12, 0x17, 0x0a, 0x12, 0x49, + 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x10, 0xf5, 0x07, 0x12, 0x18, 0x0a, 0x13, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf6, 0x07, 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, 0xf9, 0x07, 0x12, 0x20, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x10, 0xf4, 0x07, 0x12, 0x17, 0x0a, 0x12, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf5, 0x07, 0x12, 0x18, - 0x0a, 0x13, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf6, 0x07, 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, 0xf9, 0x07, 0x12, 0x20, 0x0a, - 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xfa, 0x07, 0x12, - 0x11, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x54, 0x79, 0x70, 0x65, 0x10, - 0xfc, 0x07, 0x12, 0x1c, 0x0a, 0x17, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x10, 0x8a, 0x08, - 0x12, 0x14, 0x0a, 0x0f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x54, - 0x79, 0x70, 0x65, 0x10, 0x8b, 0x08, 0x12, 0x15, 0x0a, 0x10, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x10, 0x8c, 0x08, 0x12, 0x1c, 0x0a, - 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x74, 0x72, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x10, 0x8d, 0x08, 0x12, 0x21, 0x0a, 0x1c, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0x8e, 0x08, 0x12, 0x1d, - 0x0a, 0x18, 0x51, 0x75, 0x69, 0x65, 0x73, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0x8f, 0x08, 0x12, 0x1f, 0x0a, - 0x1a, 0x44, 0x65, 0x71, 0x75, 0x69, 0x65, 0x73, 0x63, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0x90, 0x08, 0x12, 0x1f, - 0x0a, 0x1a, 0x50, 0x65, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0x9a, 0x08, 0x12, - 0x13, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x10, 0x0a, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x0b, 0x12, 0x16, - 0x0a, 0x12, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x10, 0x0c, 0x2a, 0x3a, 0x0a, 0x10, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, - 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x61, - 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5a, 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12, 0x12, - 0x0a, 0x0e, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x10, 0x01, 0x2a, 0x35, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, - 0x65, 0x73, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x53, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4e, 0x65, 0x77, 0x43, 0x74, 0x72, 0x6c, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x01, 0x2a, 0x3d, 0x0a, 0x14, 0x54, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, - 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x00, 0x12, 0x0c, - 0x0a, 0x08, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, - 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x2a, 0x83, 0x01, 0x0a, 0x0c, 0x46, 0x61, 0x75, - 0x6c, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x6e, 0x67, - 0x72, 0x65, 0x73, 0x73, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x45, - 0x67, 0x72, 0x65, 0x73, 0x73, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, - 0x4c, 0x69, 0x6e, 0x6b, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x46, - 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x03, 0x12, 0x1c, 0x0a, - 0x18, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x46, 0x6f, 0x72, - 0x77, 0x61, 0x72, 0x64, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x4c, - 0x69, 0x6e, 0x6b, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x10, 0x05, 0x2a, 0x28, - 0x0a, 0x08, 0x44, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x45, 0x6e, 0x64, 0x10, 0x01, 0x12, 0x08, - 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x10, 0x02, 0x2a, 0x34, 0x0a, 0x09, 0x50, 0x65, 0x65, 0x72, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, - 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x10, - 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x10, 0x02, 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, - 0x63, 0x74, 0x72, 0x6c, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x65, 0x10, 0xfa, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x10, 0xfc, 0x07, 0x12, 0x1c, 0x0a, 0x17, 0x43, 0x69, 0x72, 0x63, + 0x75, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x10, 0x8a, 0x08, 0x12, 0x14, 0x0a, 0x0f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x54, 0x79, 0x70, 0x65, 0x10, 0x8b, 0x08, 0x12, 0x15, 0x0a, 0x10, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, + 0x10, 0x8c, 0x08, 0x12, 0x1c, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x74, 0x72, + 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x10, 0x8d, + 0x08, 0x12, 0x21, 0x0a, 0x1c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x10, 0x8e, 0x08, 0x12, 0x1d, 0x0a, 0x18, 0x51, 0x75, 0x69, 0x65, 0x73, 0x63, 0x65, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x10, 0x8f, 0x08, 0x12, 0x1f, 0x0a, 0x1a, 0x44, 0x65, 0x71, 0x75, 0x69, 0x65, 0x73, 0x63, 0x65, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x10, 0x90, 0x08, 0x12, 0x25, 0x0a, 0x20, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x56, 0x32, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0x91, 0x08, 0x12, 0x26, 0x0a, 0x21, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x56, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x10, 0x92, 0x08, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x65, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x10, 0x9a, 0x08, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, + 0x73, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x0a, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x10, 0x0b, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x0c, 0x2a, 0x3a, 0x0a, 0x10, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, + 0x12, 0x0a, 0x0e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5a, 0x65, 0x72, + 0x6f, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x69, 0x6e, 0x6b, 0x4d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x2a, 0x35, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x6e, 0x75, 0x73, 0x65, + 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4e, 0x65, + 0x77, 0x43, 0x74, 0x72, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x01, 0x2a, 0x3d, + 0x0a, 0x14, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x65, 0x63, + 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, + 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x2a, 0x52, 0x0a, + 0x17, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x6e, 0x6b, 0x6e, + 0x6f, 0x77, 0x6e, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, + 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, + 0x72, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x10, + 0x02, 0x2a, 0x83, 0x01, 0x0a, 0x0c, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x46, 0x61, 0x75, + 0x6c, 0x74, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x46, 0x61, + 0x75, 0x6c, 0x74, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x69, 0x6e, 0x6b, 0x46, 0x61, 0x75, + 0x6c, 0x74, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x46, + 0x61, 0x75, 0x6c, 0x74, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, + 0x6e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x46, 0x61, 0x75, + 0x6c, 0x74, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x69, 0x6e, 0x6b, 0x44, 0x75, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x10, 0x05, 0x2a, 0x28, 0x0a, 0x08, 0x44, 0x65, 0x73, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x72, 0x74, 0x10, 0x00, 0x12, 0x07, + 0x0a, 0x03, 0x45, 0x6e, 0x64, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x10, + 0x02, 0x2a, 0x34, 0x0a, 0x09, 0x50, 0x65, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, + 0x0a, 0x07, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x55, + 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x10, 0x02, 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, 0x63, 0x74, 0x72, 0x6c, 0x5f, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2623,81 +2883,90 @@ func file_ctrl_proto_rawDescGZIP() []byte { return file_ctrl_proto_rawDescData } -var file_ctrl_proto_enumTypes = make([]protoimpl.EnumInfo, 7) -var file_ctrl_proto_msgTypes = make([]protoimpl.MessageInfo, 36) +var file_ctrl_proto_enumTypes = make([]protoimpl.EnumInfo, 8) +var file_ctrl_proto_msgTypes = make([]protoimpl.MessageInfo, 40) var file_ctrl_proto_goTypes = []interface{}{ - (ContentType)(0), // 0: ziti.ctrl.pb.ContentType - (RouterCapability)(0), // 1: ziti.ctrl.pb.RouterCapability - (SettingTypes)(0), // 2: ziti.ctrl.pb.SettingTypes - (TerminatorPrecedence)(0), // 3: ziti.ctrl.pb.TerminatorPrecedence - (FaultSubject)(0), // 4: ziti.ctrl.pb.FaultSubject - (DestType)(0), // 5: ziti.ctrl.pb.DestType - (PeerState)(0), // 6: ziti.ctrl.pb.PeerState - (*Settings)(nil), // 7: ziti.ctrl.pb.Settings - (*CircuitRequest)(nil), // 8: ziti.ctrl.pb.CircuitRequest - (*CircuitConfirmation)(nil), // 9: ziti.ctrl.pb.CircuitConfirmation - (*CreateTerminatorRequest)(nil), // 10: ziti.ctrl.pb.CreateTerminatorRequest - (*RemoveTerminatorRequest)(nil), // 11: ziti.ctrl.pb.RemoveTerminatorRequest - (*RemoveTerminatorsRequest)(nil), // 12: ziti.ctrl.pb.RemoveTerminatorsRequest - (*Terminator)(nil), // 13: ziti.ctrl.pb.Terminator - (*ValidateTerminatorsRequest)(nil), // 14: ziti.ctrl.pb.ValidateTerminatorsRequest - (*UpdateTerminatorRequest)(nil), // 15: ziti.ctrl.pb.UpdateTerminatorRequest - (*Dial)(nil), // 16: ziti.ctrl.pb.Dial - (*LinkConn)(nil), // 17: ziti.ctrl.pb.LinkConn - (*LinkConnected)(nil), // 18: ziti.ctrl.pb.LinkConnected - (*RouterLinks)(nil), // 19: ziti.ctrl.pb.RouterLinks - (*Fault)(nil), // 20: ziti.ctrl.pb.Fault - (*Context)(nil), // 21: ziti.ctrl.pb.Context - (*Route)(nil), // 22: ziti.ctrl.pb.Route - (*Unroute)(nil), // 23: ziti.ctrl.pb.Unroute - (*InspectRequest)(nil), // 24: ziti.ctrl.pb.InspectRequest - (*InspectResponse)(nil), // 25: ziti.ctrl.pb.InspectResponse - (*VerifyRouter)(nil), // 26: ziti.ctrl.pb.VerifyRouter - (*Listener)(nil), // 27: ziti.ctrl.pb.Listener - (*Listeners)(nil), // 28: ziti.ctrl.pb.Listeners - (*UpdateCtrlAddresses)(nil), // 29: ziti.ctrl.pb.UpdateCtrlAddresses - (*PeerStateChange)(nil), // 30: ziti.ctrl.pb.PeerStateChange - (*PeerStateChanges)(nil), // 31: ziti.ctrl.pb.PeerStateChanges - (*RouterMetadata)(nil), // 32: ziti.ctrl.pb.RouterMetadata - nil, // 33: ziti.ctrl.pb.Settings.DataEntry - nil, // 34: ziti.ctrl.pb.CircuitRequest.PeerDataEntry - nil, // 35: ziti.ctrl.pb.CreateTerminatorRequest.PeerDataEntry - (*RouterLinks_RouterLink)(nil), // 36: ziti.ctrl.pb.RouterLinks.RouterLink - nil, // 37: ziti.ctrl.pb.Context.FieldsEntry - (*Route_Egress)(nil), // 38: ziti.ctrl.pb.Route.Egress - (*Route_Forward)(nil), // 39: ziti.ctrl.pb.Route.Forward - nil, // 40: ziti.ctrl.pb.Route.TagsEntry - nil, // 41: ziti.ctrl.pb.Route.Egress.PeerDataEntry - (*InspectResponse_InspectValue)(nil), // 42: ziti.ctrl.pb.InspectResponse.InspectValue + (ContentType)(0), // 0: ziti.ctrl.pb.ContentType + (RouterCapability)(0), // 1: ziti.ctrl.pb.RouterCapability + (SettingTypes)(0), // 2: ziti.ctrl.pb.SettingTypes + (TerminatorPrecedence)(0), // 3: ziti.ctrl.pb.TerminatorPrecedence + (TerminatorInvalidReason)(0), // 4: ziti.ctrl.pb.TerminatorInvalidReason + (FaultSubject)(0), // 5: ziti.ctrl.pb.FaultSubject + (DestType)(0), // 6: ziti.ctrl.pb.DestType + (PeerState)(0), // 7: ziti.ctrl.pb.PeerState + (*Settings)(nil), // 8: ziti.ctrl.pb.Settings + (*CircuitRequest)(nil), // 9: ziti.ctrl.pb.CircuitRequest + (*CircuitConfirmation)(nil), // 10: ziti.ctrl.pb.CircuitConfirmation + (*CreateTerminatorRequest)(nil), // 11: ziti.ctrl.pb.CreateTerminatorRequest + (*RemoveTerminatorRequest)(nil), // 12: ziti.ctrl.pb.RemoveTerminatorRequest + (*RemoveTerminatorsRequest)(nil), // 13: ziti.ctrl.pb.RemoveTerminatorsRequest + (*Terminator)(nil), // 14: ziti.ctrl.pb.Terminator + (*ValidateTerminatorsRequest)(nil), // 15: ziti.ctrl.pb.ValidateTerminatorsRequest + (*ValidateTerminatorsV2Request)(nil), // 16: ziti.ctrl.pb.ValidateTerminatorsV2Request + (*RouterTerminatorState)(nil), // 17: ziti.ctrl.pb.RouterTerminatorState + (*ValidateTerminatorsV2Response)(nil), // 18: ziti.ctrl.pb.ValidateTerminatorsV2Response + (*UpdateTerminatorRequest)(nil), // 19: ziti.ctrl.pb.UpdateTerminatorRequest + (*Dial)(nil), // 20: ziti.ctrl.pb.Dial + (*LinkConn)(nil), // 21: ziti.ctrl.pb.LinkConn + (*LinkConnected)(nil), // 22: ziti.ctrl.pb.LinkConnected + (*RouterLinks)(nil), // 23: ziti.ctrl.pb.RouterLinks + (*Fault)(nil), // 24: ziti.ctrl.pb.Fault + (*Context)(nil), // 25: ziti.ctrl.pb.Context + (*Route)(nil), // 26: ziti.ctrl.pb.Route + (*Unroute)(nil), // 27: ziti.ctrl.pb.Unroute + (*InspectRequest)(nil), // 28: ziti.ctrl.pb.InspectRequest + (*InspectResponse)(nil), // 29: ziti.ctrl.pb.InspectResponse + (*VerifyRouter)(nil), // 30: ziti.ctrl.pb.VerifyRouter + (*Listener)(nil), // 31: ziti.ctrl.pb.Listener + (*Listeners)(nil), // 32: ziti.ctrl.pb.Listeners + (*UpdateCtrlAddresses)(nil), // 33: ziti.ctrl.pb.UpdateCtrlAddresses + (*PeerStateChange)(nil), // 34: ziti.ctrl.pb.PeerStateChange + (*PeerStateChanges)(nil), // 35: ziti.ctrl.pb.PeerStateChanges + (*RouterMetadata)(nil), // 36: ziti.ctrl.pb.RouterMetadata + nil, // 37: ziti.ctrl.pb.Settings.DataEntry + nil, // 38: ziti.ctrl.pb.CircuitRequest.PeerDataEntry + nil, // 39: ziti.ctrl.pb.CreateTerminatorRequest.PeerDataEntry + nil, // 40: ziti.ctrl.pb.ValidateTerminatorsV2Response.StatesEntry + (*RouterLinks_RouterLink)(nil), // 41: ziti.ctrl.pb.RouterLinks.RouterLink + nil, // 42: ziti.ctrl.pb.Context.FieldsEntry + (*Route_Egress)(nil), // 43: ziti.ctrl.pb.Route.Egress + (*Route_Forward)(nil), // 44: ziti.ctrl.pb.Route.Forward + nil, // 45: ziti.ctrl.pb.Route.TagsEntry + nil, // 46: ziti.ctrl.pb.Route.Egress.PeerDataEntry + (*InspectResponse_InspectValue)(nil), // 47: ziti.ctrl.pb.InspectResponse.InspectValue } var file_ctrl_proto_depIdxs = []int32{ - 33, // 0: ziti.ctrl.pb.Settings.data:type_name -> ziti.ctrl.pb.Settings.DataEntry - 34, // 1: ziti.ctrl.pb.CircuitRequest.peerData:type_name -> ziti.ctrl.pb.CircuitRequest.PeerDataEntry - 35, // 2: ziti.ctrl.pb.CreateTerminatorRequest.peerData:type_name -> ziti.ctrl.pb.CreateTerminatorRequest.PeerDataEntry + 37, // 0: ziti.ctrl.pb.Settings.data:type_name -> ziti.ctrl.pb.Settings.DataEntry + 38, // 1: ziti.ctrl.pb.CircuitRequest.peerData:type_name -> ziti.ctrl.pb.CircuitRequest.PeerDataEntry + 39, // 2: ziti.ctrl.pb.CreateTerminatorRequest.peerData:type_name -> ziti.ctrl.pb.CreateTerminatorRequest.PeerDataEntry 3, // 3: ziti.ctrl.pb.CreateTerminatorRequest.precedence:type_name -> ziti.ctrl.pb.TerminatorPrecedence - 13, // 4: ziti.ctrl.pb.ValidateTerminatorsRequest.terminators:type_name -> ziti.ctrl.pb.Terminator - 3, // 5: ziti.ctrl.pb.UpdateTerminatorRequest.precedence:type_name -> ziti.ctrl.pb.TerminatorPrecedence - 17, // 6: ziti.ctrl.pb.LinkConnected.conns:type_name -> ziti.ctrl.pb.LinkConn - 36, // 7: ziti.ctrl.pb.RouterLinks.links:type_name -> ziti.ctrl.pb.RouterLinks.RouterLink - 4, // 8: ziti.ctrl.pb.Fault.subject:type_name -> ziti.ctrl.pb.FaultSubject - 37, // 9: ziti.ctrl.pb.Context.fields:type_name -> ziti.ctrl.pb.Context.FieldsEntry - 38, // 10: ziti.ctrl.pb.Route.egress:type_name -> ziti.ctrl.pb.Route.Egress - 39, // 11: ziti.ctrl.pb.Route.forwards:type_name -> ziti.ctrl.pb.Route.Forward - 21, // 12: ziti.ctrl.pb.Route.context:type_name -> ziti.ctrl.pb.Context - 40, // 13: ziti.ctrl.pb.Route.tags:type_name -> ziti.ctrl.pb.Route.TagsEntry - 42, // 14: ziti.ctrl.pb.InspectResponse.values:type_name -> ziti.ctrl.pb.InspectResponse.InspectValue - 27, // 15: ziti.ctrl.pb.Listeners.listeners:type_name -> ziti.ctrl.pb.Listener - 6, // 16: ziti.ctrl.pb.PeerStateChange.state:type_name -> ziti.ctrl.pb.PeerState - 27, // 17: ziti.ctrl.pb.PeerStateChange.listeners:type_name -> ziti.ctrl.pb.Listener - 30, // 18: ziti.ctrl.pb.PeerStateChanges.changes:type_name -> ziti.ctrl.pb.PeerStateChange - 1, // 19: ziti.ctrl.pb.RouterMetadata.capabilities:type_name -> ziti.ctrl.pb.RouterCapability - 41, // 20: ziti.ctrl.pb.Route.Egress.peerData:type_name -> ziti.ctrl.pb.Route.Egress.PeerDataEntry - 5, // 21: ziti.ctrl.pb.Route.Forward.dstType:type_name -> ziti.ctrl.pb.DestType - 22, // [22:22] is the sub-list for method output_type - 22, // [22:22] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name + 14, // 4: ziti.ctrl.pb.ValidateTerminatorsRequest.terminators:type_name -> ziti.ctrl.pb.Terminator + 14, // 5: ziti.ctrl.pb.ValidateTerminatorsV2Request.terminators:type_name -> ziti.ctrl.pb.Terminator + 4, // 6: ziti.ctrl.pb.RouterTerminatorState.reason:type_name -> ziti.ctrl.pb.TerminatorInvalidReason + 40, // 7: ziti.ctrl.pb.ValidateTerminatorsV2Response.states:type_name -> ziti.ctrl.pb.ValidateTerminatorsV2Response.StatesEntry + 3, // 8: ziti.ctrl.pb.UpdateTerminatorRequest.precedence:type_name -> ziti.ctrl.pb.TerminatorPrecedence + 21, // 9: ziti.ctrl.pb.LinkConnected.conns:type_name -> ziti.ctrl.pb.LinkConn + 41, // 10: ziti.ctrl.pb.RouterLinks.links:type_name -> ziti.ctrl.pb.RouterLinks.RouterLink + 5, // 11: ziti.ctrl.pb.Fault.subject:type_name -> ziti.ctrl.pb.FaultSubject + 42, // 12: ziti.ctrl.pb.Context.fields:type_name -> ziti.ctrl.pb.Context.FieldsEntry + 43, // 13: ziti.ctrl.pb.Route.egress:type_name -> ziti.ctrl.pb.Route.Egress + 44, // 14: ziti.ctrl.pb.Route.forwards:type_name -> ziti.ctrl.pb.Route.Forward + 25, // 15: ziti.ctrl.pb.Route.context:type_name -> ziti.ctrl.pb.Context + 45, // 16: ziti.ctrl.pb.Route.tags:type_name -> ziti.ctrl.pb.Route.TagsEntry + 47, // 17: ziti.ctrl.pb.InspectResponse.values:type_name -> ziti.ctrl.pb.InspectResponse.InspectValue + 31, // 18: ziti.ctrl.pb.Listeners.listeners:type_name -> ziti.ctrl.pb.Listener + 7, // 19: ziti.ctrl.pb.PeerStateChange.state:type_name -> ziti.ctrl.pb.PeerState + 31, // 20: ziti.ctrl.pb.PeerStateChange.listeners:type_name -> ziti.ctrl.pb.Listener + 34, // 21: ziti.ctrl.pb.PeerStateChanges.changes:type_name -> ziti.ctrl.pb.PeerStateChange + 1, // 22: ziti.ctrl.pb.RouterMetadata.capabilities:type_name -> ziti.ctrl.pb.RouterCapability + 17, // 23: ziti.ctrl.pb.ValidateTerminatorsV2Response.StatesEntry.value:type_name -> ziti.ctrl.pb.RouterTerminatorState + 46, // 24: ziti.ctrl.pb.Route.Egress.peerData:type_name -> ziti.ctrl.pb.Route.Egress.PeerDataEntry + 6, // 25: ziti.ctrl.pb.Route.Forward.dstType:type_name -> ziti.ctrl.pb.DestType + 26, // [26:26] is the sub-list for method output_type + 26, // [26:26] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_ctrl_proto_init() } @@ -2803,7 +3072,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateTerminatorRequest); i { + switch v := v.(*ValidateTerminatorsV2Request); i { case 0: return &v.state case 1: @@ -2815,7 +3084,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Dial); i { + switch v := v.(*RouterTerminatorState); i { case 0: return &v.state case 1: @@ -2827,7 +3096,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LinkConn); i { + switch v := v.(*ValidateTerminatorsV2Response); i { case 0: return &v.state case 1: @@ -2839,7 +3108,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LinkConnected); i { + switch v := v.(*UpdateTerminatorRequest); i { case 0: return &v.state case 1: @@ -2851,7 +3120,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RouterLinks); i { + switch v := v.(*Dial); i { case 0: return &v.state case 1: @@ -2863,7 +3132,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Fault); i { + switch v := v.(*LinkConn); i { case 0: return &v.state case 1: @@ -2875,7 +3144,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Context); i { + switch v := v.(*LinkConnected); i { case 0: return &v.state case 1: @@ -2887,7 +3156,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Route); i { + switch v := v.(*RouterLinks); i { case 0: return &v.state case 1: @@ -2899,7 +3168,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Unroute); i { + switch v := v.(*Fault); i { case 0: return &v.state case 1: @@ -2911,7 +3180,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InspectRequest); i { + switch v := v.(*Context); i { case 0: return &v.state case 1: @@ -2923,7 +3192,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InspectResponse); i { + switch v := v.(*Route); i { case 0: return &v.state case 1: @@ -2935,7 +3204,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerifyRouter); i { + switch v := v.(*Unroute); i { case 0: return &v.state case 1: @@ -2947,7 +3216,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Listener); i { + switch v := v.(*InspectRequest); i { case 0: return &v.state case 1: @@ -2959,7 +3228,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Listeners); i { + switch v := v.(*InspectResponse); i { case 0: return &v.state case 1: @@ -2971,7 +3240,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateCtrlAddresses); i { + switch v := v.(*VerifyRouter); i { case 0: return &v.state case 1: @@ -2983,7 +3252,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeerStateChange); i { + switch v := v.(*Listener); i { case 0: return &v.state case 1: @@ -2995,7 +3264,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PeerStateChanges); i { + switch v := v.(*Listeners); i { case 0: return &v.state case 1: @@ -3007,6 +3276,42 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateCtrlAddresses); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ctrl_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PeerStateChange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ctrl_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PeerStateChanges); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ctrl_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RouterMetadata); i { case 0: return &v.state @@ -3018,7 +3323,7 @@ func file_ctrl_proto_init() { return nil } } - file_ctrl_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_ctrl_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RouterLinks_RouterLink); i { case 0: return &v.state @@ -3030,7 +3335,7 @@ func file_ctrl_proto_init() { return nil } } - file_ctrl_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_ctrl_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Route_Egress); i { case 0: return &v.state @@ -3042,7 +3347,7 @@ func file_ctrl_proto_init() { return nil } } - file_ctrl_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_ctrl_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Route_Forward); i { case 0: return &v.state @@ -3054,7 +3359,7 @@ func file_ctrl_proto_init() { return nil } } - file_ctrl_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_ctrl_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InspectResponse_InspectValue); i { case 0: return &v.state @@ -3072,8 +3377,8 @@ func file_ctrl_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_ctrl_proto_rawDesc, - NumEnums: 7, - NumMessages: 36, + NumEnums: 8, + NumMessages: 40, NumExtensions: 0, NumServices: 0, }, diff --git a/common/pb/ctrl_pb/ctrl.proto b/common/pb/ctrl_pb/ctrl.proto index 5df7a40e2..a26a462b3 100644 --- a/common/pb/ctrl_pb/ctrl.proto +++ b/common/pb/ctrl_pb/ctrl.proto @@ -36,6 +36,8 @@ enum ContentType { RemoveTerminatorsRequestType = 1038; QuiesceRouterRequestType = 1039; DequiesceRouterRequestType = 1040; + ValidateTerminatorsV2RequestType = 1041; + ValidateTerminatorsV2ResponseType = 1042; PeerStateChangeRequestType = 1050; @@ -108,6 +110,27 @@ message ValidateTerminatorsRequest { repeated Terminator terminators = 1; } +message ValidateTerminatorsV2Request { + repeated Terminator terminators = 1; + bool fixInvalid = 2; +} + +enum TerminatorInvalidReason { + UnknownBinding = 0; + UnknownTerminator = 1; + BadState = 2; +} + +message RouterTerminatorState { + bool valid = 1; + TerminatorInvalidReason reason = 2; + string detail = 3; // inspect info if valid +} + +message ValidateTerminatorsV2Response { + map states = 1; +} + message UpdateTerminatorRequest { string terminatorId = 1; bool updatePrecedence = 2; diff --git a/common/pb/ctrl_pb/impl.go b/common/pb/ctrl_pb/impl.go index dfa89c98a..0b08aee27 100644 --- a/common/pb/ctrl_pb/impl.go +++ b/common/pb/ctrl_pb/impl.go @@ -50,6 +50,14 @@ func (request *ValidateTerminatorsRequest) GetContentType() int32 { return int32(ContentType_ValidateTerminatorsRequestType) } +func (request *ValidateTerminatorsV2Request) GetContentType() int32 { + return int32(ContentType_ValidateTerminatorsV2RequestType) +} + +func (request *ValidateTerminatorsV2Response) GetContentType() int32 { + return int32(ContentType_ValidateTerminatorsV2ResponseType) +} + func (request *Dial) GetContentType() int32 { return int32(ContentType_DialType) } diff --git a/common/pb/mgmt_pb/impl.go b/common/pb/mgmt_pb/impl.go index 931f6b355..78756b4b8 100644 --- a/common/pb/mgmt_pb/impl.go +++ b/common/pb/mgmt_pb/impl.go @@ -11,3 +11,15 @@ func (request *InspectResponse) GetContentType() int32 { func (request *RaftMemberListResponse) GetContentType() int32 { return int32(ContentType_RaftListMembersResponseType) } + +func (request *ValidateTerminatorsRequest) GetContentType() int32 { + return int32(ContentType_ValidateTerminatorsRequestType) +} + +func (request *ValidateTerminatorsResponse) GetContentType() int32 { + return int32(ContentType_ValidateTerminatorResponseType) +} + +func (request *TerminatorDetail) GetContentType() int32 { + return int32(ContentType_ValidateTerminatorResultType) +} diff --git a/common/pb/mgmt_pb/mgmt.pb.go b/common/pb/mgmt_pb/mgmt.pb.go index 833637ea2..fc5306911 100644 --- a/common/pb/mgmt_pb/mgmt.pb.go +++ b/common/pb/mgmt_pb/mgmt.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.31.0 // protoc v3.19.1 // source: mgmt.proto @@ -54,6 +54,10 @@ const ( ContentType_RaftRemovePeerRequestType ContentType = 10083 ContentType_RaftTransferLeadershipRequestType ContentType = 10084 ContentType_RaftInitFromDb ContentType = 10085 + // Validate + ContentType_ValidateTerminatorsRequestType ContentType = 10100 + ContentType_ValidateTerminatorResponseType ContentType = 10101 + ContentType_ValidateTerminatorResultType ContentType = 10102 ) // Enum value maps for ContentType. @@ -83,6 +87,9 @@ var ( 10083: "RaftRemovePeerRequestType", 10084: "RaftTransferLeadershipRequestType", 10085: "RaftInitFromDb", + 10100: "ValidateTerminatorsRequestType", + 10101: "ValidateTerminatorResponseType", + 10102: "ValidateTerminatorResultType", } ContentType_value = map[string]int32{ "Zero": 0, @@ -109,6 +116,9 @@ var ( "RaftRemovePeerRequestType": 10083, "RaftTransferLeadershipRequestType": 10084, "RaftInitFromDb": 10085, + "ValidateTerminatorsRequestType": 10100, + "ValidateTerminatorResponseType": 10101, + "ValidateTerminatorResultType": 10102, } ) @@ -292,6 +302,61 @@ func (TraceFilterType) EnumDescriptor() ([]byte, []int) { return file_mgmt_proto_rawDescGZIP(), []int{3} } +type TerminatorState int32 + +const ( + TerminatorState_Valid TerminatorState = 0 + TerminatorState_Unknown TerminatorState = 1 + TerminatorState_InvalidUnknownBinding TerminatorState = 2 + TerminatorState_InvalidUnknownTerminator TerminatorState = 3 + TerminatorState_InvalidBadState TerminatorState = 4 +) + +// Enum value maps for TerminatorState. +var ( + TerminatorState_name = map[int32]string{ + 0: "Valid", + 1: "Unknown", + 2: "InvalidUnknownBinding", + 3: "InvalidUnknownTerminator", + 4: "InvalidBadState", + } + TerminatorState_value = map[string]int32{ + "Valid": 0, + "Unknown": 1, + "InvalidUnknownBinding": 2, + "InvalidUnknownTerminator": 3, + "InvalidBadState": 4, + } +) + +func (x TerminatorState) Enum() *TerminatorState { + p := new(TerminatorState) + *p = x + return p +} + +func (x TerminatorState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TerminatorState) Descriptor() protoreflect.EnumDescriptor { + return file_mgmt_proto_enumTypes[4].Descriptor() +} + +func (TerminatorState) Type() protoreflect.EnumType { + return &file_mgmt_proto_enumTypes[4] +} + +func (x TerminatorState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TerminatorState.Descriptor instead. +func (TerminatorState) EnumDescriptor() ([]byte, []int) { + return file_mgmt_proto_rawDescGZIP(), []int{4} +} + type StreamMetricsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -971,6 +1036,259 @@ func (x *RaftMemberListResponse) GetMembers() []*RaftMember { return nil } +type ValidateTerminatorsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` + FixInvalid bool `protobuf:"varint,2,opt,name=fixInvalid,proto3" json:"fixInvalid,omitempty"` +} + +func (x *ValidateTerminatorsRequest) Reset() { + *x = ValidateTerminatorsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mgmt_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateTerminatorsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateTerminatorsRequest) ProtoMessage() {} + +func (x *ValidateTerminatorsRequest) ProtoReflect() protoreflect.Message { + mi := &file_mgmt_proto_msgTypes[10] + 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 ValidateTerminatorsRequest.ProtoReflect.Descriptor instead. +func (*ValidateTerminatorsRequest) Descriptor() ([]byte, []int) { + return file_mgmt_proto_rawDescGZIP(), []int{10} +} + +func (x *ValidateTerminatorsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ValidateTerminatorsRequest) GetFixInvalid() bool { + if x != nil { + return x.FixInvalid + } + return false +} + +type ValidateTerminatorsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + TerminatorCount uint64 `protobuf:"varint,3,opt,name=terminatorCount,proto3" json:"terminatorCount,omitempty"` +} + +func (x *ValidateTerminatorsResponse) Reset() { + *x = ValidateTerminatorsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mgmt_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidateTerminatorsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateTerminatorsResponse) ProtoMessage() {} + +func (x *ValidateTerminatorsResponse) ProtoReflect() protoreflect.Message { + mi := &file_mgmt_proto_msgTypes[11] + 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 ValidateTerminatorsResponse.ProtoReflect.Descriptor instead. +func (*ValidateTerminatorsResponse) Descriptor() ([]byte, []int) { + return file_mgmt_proto_rawDescGZIP(), []int{11} +} + +func (x *ValidateTerminatorsResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *ValidateTerminatorsResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *ValidateTerminatorsResponse) GetTerminatorCount() uint64 { + if x != nil { + return x.TerminatorCount + } + return 0 +} + +type TerminatorDetail struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TerminatorId string `protobuf:"bytes,1,opt,name=terminatorId,proto3" json:"terminatorId,omitempty"` + ServiceId string `protobuf:"bytes,2,opt,name=serviceId,proto3" json:"serviceId,omitempty"` + ServiceName string `protobuf:"bytes,3,opt,name=serviceName,proto3" json:"serviceName,omitempty"` + RouterId string `protobuf:"bytes,4,opt,name=routerId,proto3" json:"routerId,omitempty"` + RouterName string `protobuf:"bytes,5,opt,name=routerName,proto3" json:"routerName,omitempty"` + Binding string `protobuf:"bytes,6,opt,name=binding,proto3" json:"binding,omitempty"` + Address string `protobuf:"bytes,7,opt,name=address,proto3" json:"address,omitempty"` + HostId string `protobuf:"bytes,8,opt,name=hostId,proto3" json:"hostId,omitempty"` + CreateDate string `protobuf:"bytes,9,opt,name=createDate,proto3" json:"createDate,omitempty"` + State TerminatorState `protobuf:"varint,10,opt,name=state,proto3,enum=ziti.mgmt_pb.TerminatorState" json:"state,omitempty"` + Fixed bool `protobuf:"varint,11,opt,name=fixed,proto3" json:"fixed,omitempty"` + Detail string `protobuf:"bytes,12,opt,name=detail,proto3" json:"detail,omitempty"` +} + +func (x *TerminatorDetail) Reset() { + *x = TerminatorDetail{} + if protoimpl.UnsafeEnabled { + mi := &file_mgmt_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TerminatorDetail) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TerminatorDetail) ProtoMessage() {} + +func (x *TerminatorDetail) ProtoReflect() protoreflect.Message { + mi := &file_mgmt_proto_msgTypes[12] + 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 TerminatorDetail.ProtoReflect.Descriptor instead. +func (*TerminatorDetail) Descriptor() ([]byte, []int) { + return file_mgmt_proto_rawDescGZIP(), []int{12} +} + +func (x *TerminatorDetail) GetTerminatorId() string { + if x != nil { + return x.TerminatorId + } + return "" +} + +func (x *TerminatorDetail) GetServiceId() string { + if x != nil { + return x.ServiceId + } + return "" +} + +func (x *TerminatorDetail) GetServiceName() string { + if x != nil { + return x.ServiceName + } + return "" +} + +func (x *TerminatorDetail) GetRouterId() string { + if x != nil { + return x.RouterId + } + return "" +} + +func (x *TerminatorDetail) GetRouterName() string { + if x != nil { + return x.RouterName + } + return "" +} + +func (x *TerminatorDetail) GetBinding() string { + if x != nil { + return x.Binding + } + return "" +} + +func (x *TerminatorDetail) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *TerminatorDetail) GetHostId() string { + if x != nil { + return x.HostId + } + return "" +} + +func (x *TerminatorDetail) GetCreateDate() string { + if x != nil { + return x.CreateDate + } + return "" +} + +func (x *TerminatorDetail) GetState() TerminatorState { + if x != nil { + return x.State + } + return TerminatorState_Valid +} + +func (x *TerminatorDetail) GetFixed() bool { + if x != nil { + return x.Fixed + } + return false +} + +func (x *TerminatorDetail) GetDetail() string { + if x != nil { + return x.Detail + } + return "" +} + type StreamMetricsRequest_MetricMatcher struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -983,7 +1301,7 @@ type StreamMetricsRequest_MetricMatcher struct { func (x *StreamMetricsRequest_MetricMatcher) Reset() { *x = StreamMetricsRequest_MetricMatcher{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_proto_msgTypes[10] + mi := &file_mgmt_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -996,7 +1314,7 @@ func (x *StreamMetricsRequest_MetricMatcher) String() string { func (*StreamMetricsRequest_MetricMatcher) ProtoMessage() {} func (x *StreamMetricsRequest_MetricMatcher) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_proto_msgTypes[10] + mi := &file_mgmt_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1040,7 +1358,7 @@ type StreamMetricsEvent_IntervalMetric struct { func (x *StreamMetricsEvent_IntervalMetric) Reset() { *x = StreamMetricsEvent_IntervalMetric{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_proto_msgTypes[14] + mi := &file_mgmt_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1053,7 +1371,7 @@ func (x *StreamMetricsEvent_IntervalMetric) String() string { func (*StreamMetricsEvent_IntervalMetric) ProtoMessage() {} func (x *StreamMetricsEvent_IntervalMetric) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_proto_msgTypes[14] + mi := &file_mgmt_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1110,7 +1428,7 @@ type InspectResponse_InspectValue struct { func (x *InspectResponse_InspectValue) Reset() { *x = InspectResponse_InspectValue{} if protoimpl.UnsafeEnabled { - mi := &file_mgmt_proto_msgTypes[17] + mi := &file_mgmt_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1123,7 +1441,7 @@ func (x *InspectResponse_InspectValue) String() string { func (*InspectResponse_InspectValue) ProtoMessage() {} func (x *InspectResponse_InspectValue) ProtoReflect() protoreflect.Message { - mi := &file_mgmt_proto_msgTypes[17] + mi := &file_mgmt_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1325,74 +1643,126 @@ var file_mgmt_proto_rawDesc = []byte{ 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x66, 0x74, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2a, 0xff, - 0x05, 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, 0x12, 0x0a, 0x0d, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x72, 0x51, 0x75, 0x69, 0x65, 0x73, 0x63, 0x65, 0x10, 0xdd, 0x4e, 0x12, 0x14, 0x0a, - 0x0f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x44, 0x65, 0x71, 0x75, 0x69, 0x65, 0x73, 0x63, 0x65, - 0x10, 0xde, 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, - 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, 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, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x54, + 0x0a, 0x1a, 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, 0x12, 0x16, 0x0a, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x78, 0x49, 0x6e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x66, 0x69, 0x78, 0x49, 0x6e, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x22, 0x7b, 0x0a, 0x1b, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x81, 0x03, 0x0a, 0x10, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, + 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, + 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x49, 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, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x18, 0x06, 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, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x6f, + 0x73, 0x74, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, + 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x65, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, + 0x74, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1d, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, + 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x78, 0x65, 0x64, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x69, 0x78, 0x65, 0x64, 0x12, 0x16, 0x0a, + 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x2a, 0xec, 0x06, 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, 0x12, 0x0a, 0x0d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x51, 0x75, 0x69, 0x65, 0x73, 0x63, + 0x65, 0x10, 0xdd, 0x4e, 0x12, 0x14, 0x0a, 0x0f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x44, 0x65, + 0x71, 0x75, 0x69, 0x65, 0x73, 0x63, 0x65, 0x10, 0xde, 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, 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, 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, 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 ( @@ -1407,54 +1777,59 @@ func file_mgmt_proto_rawDescGZIP() []byte { return file_mgmt_proto_rawDescData } -var file_mgmt_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_mgmt_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_mgmt_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_mgmt_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_mgmt_proto_goTypes = []interface{}{ (ContentType)(0), // 0: ziti.mgmt_pb.ContentType (Header)(0), // 1: ziti.mgmt_pb.Header (StreamCircuitEventType)(0), // 2: ziti.mgmt_pb.StreamCircuitEventType (TraceFilterType)(0), // 3: ziti.mgmt_pb.TraceFilterType - (*StreamMetricsRequest)(nil), // 4: ziti.mgmt_pb.StreamMetricsRequest - (*StreamMetricsEvent)(nil), // 5: ziti.mgmt_pb.StreamMetricsEvent - (*Path)(nil), // 6: ziti.mgmt_pb.Path - (*StreamCircuitsEvent)(nil), // 7: ziti.mgmt_pb.StreamCircuitsEvent - (*ToggleCircuitTracesRequest)(nil), // 8: ziti.mgmt_pb.ToggleCircuitTracesRequest - (*StreamTracesRequest)(nil), // 9: ziti.mgmt_pb.StreamTracesRequest - (*InspectRequest)(nil), // 10: ziti.mgmt_pb.InspectRequest - (*InspectResponse)(nil), // 11: ziti.mgmt_pb.InspectResponse - (*RaftMember)(nil), // 12: ziti.mgmt_pb.RaftMember - (*RaftMemberListResponse)(nil), // 13: ziti.mgmt_pb.RaftMemberListResponse - (*StreamMetricsRequest_MetricMatcher)(nil), // 14: ziti.mgmt_pb.StreamMetricsRequest.MetricMatcher - nil, // 15: ziti.mgmt_pb.StreamMetricsEvent.TagsEntry - nil, // 16: ziti.mgmt_pb.StreamMetricsEvent.IntMetricsEntry - nil, // 17: ziti.mgmt_pb.StreamMetricsEvent.FloatMetricsEntry - (*StreamMetricsEvent_IntervalMetric)(nil), // 18: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric - nil, // 19: ziti.mgmt_pb.StreamMetricsEvent.MetricGroupEntry - nil, // 20: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.ValuesEntry - (*InspectResponse_InspectValue)(nil), // 21: ziti.mgmt_pb.InspectResponse.InspectValue - (*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp + (TerminatorState)(0), // 4: ziti.mgmt_pb.TerminatorState + (*StreamMetricsRequest)(nil), // 5: ziti.mgmt_pb.StreamMetricsRequest + (*StreamMetricsEvent)(nil), // 6: ziti.mgmt_pb.StreamMetricsEvent + (*Path)(nil), // 7: ziti.mgmt_pb.Path + (*StreamCircuitsEvent)(nil), // 8: ziti.mgmt_pb.StreamCircuitsEvent + (*ToggleCircuitTracesRequest)(nil), // 9: ziti.mgmt_pb.ToggleCircuitTracesRequest + (*StreamTracesRequest)(nil), // 10: ziti.mgmt_pb.StreamTracesRequest + (*InspectRequest)(nil), // 11: ziti.mgmt_pb.InspectRequest + (*InspectResponse)(nil), // 12: ziti.mgmt_pb.InspectResponse + (*RaftMember)(nil), // 13: ziti.mgmt_pb.RaftMember + (*RaftMemberListResponse)(nil), // 14: ziti.mgmt_pb.RaftMemberListResponse + (*ValidateTerminatorsRequest)(nil), // 15: ziti.mgmt_pb.ValidateTerminatorsRequest + (*ValidateTerminatorsResponse)(nil), // 16: ziti.mgmt_pb.ValidateTerminatorsResponse + (*TerminatorDetail)(nil), // 17: ziti.mgmt_pb.TerminatorDetail + (*StreamMetricsRequest_MetricMatcher)(nil), // 18: ziti.mgmt_pb.StreamMetricsRequest.MetricMatcher + nil, // 19: ziti.mgmt_pb.StreamMetricsEvent.TagsEntry + nil, // 20: ziti.mgmt_pb.StreamMetricsEvent.IntMetricsEntry + nil, // 21: ziti.mgmt_pb.StreamMetricsEvent.FloatMetricsEntry + (*StreamMetricsEvent_IntervalMetric)(nil), // 22: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric + nil, // 23: ziti.mgmt_pb.StreamMetricsEvent.MetricGroupEntry + nil, // 24: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.ValuesEntry + (*InspectResponse_InspectValue)(nil), // 25: ziti.mgmt_pb.InspectResponse.InspectValue + (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp } var file_mgmt_proto_depIdxs = []int32{ - 14, // 0: ziti.mgmt_pb.StreamMetricsRequest.matchers:type_name -> ziti.mgmt_pb.StreamMetricsRequest.MetricMatcher - 22, // 1: ziti.mgmt_pb.StreamMetricsEvent.timestamp:type_name -> google.protobuf.Timestamp - 15, // 2: ziti.mgmt_pb.StreamMetricsEvent.tags:type_name -> ziti.mgmt_pb.StreamMetricsEvent.TagsEntry - 16, // 3: ziti.mgmt_pb.StreamMetricsEvent.intMetrics:type_name -> ziti.mgmt_pb.StreamMetricsEvent.IntMetricsEntry - 17, // 4: ziti.mgmt_pb.StreamMetricsEvent.floatMetrics:type_name -> ziti.mgmt_pb.StreamMetricsEvent.FloatMetricsEntry - 18, // 5: ziti.mgmt_pb.StreamMetricsEvent.intervalMetrics:type_name -> ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric - 19, // 6: ziti.mgmt_pb.StreamMetricsEvent.metricGroup:type_name -> ziti.mgmt_pb.StreamMetricsEvent.MetricGroupEntry + 18, // 0: ziti.mgmt_pb.StreamMetricsRequest.matchers:type_name -> ziti.mgmt_pb.StreamMetricsRequest.MetricMatcher + 26, // 1: ziti.mgmt_pb.StreamMetricsEvent.timestamp:type_name -> google.protobuf.Timestamp + 19, // 2: ziti.mgmt_pb.StreamMetricsEvent.tags:type_name -> ziti.mgmt_pb.StreamMetricsEvent.TagsEntry + 20, // 3: ziti.mgmt_pb.StreamMetricsEvent.intMetrics:type_name -> ziti.mgmt_pb.StreamMetricsEvent.IntMetricsEntry + 21, // 4: ziti.mgmt_pb.StreamMetricsEvent.floatMetrics:type_name -> ziti.mgmt_pb.StreamMetricsEvent.FloatMetricsEntry + 22, // 5: ziti.mgmt_pb.StreamMetricsEvent.intervalMetrics:type_name -> ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric + 23, // 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 - 6, // 8: ziti.mgmt_pb.StreamCircuitsEvent.path:type_name -> ziti.mgmt_pb.Path + 7, // 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 - 21, // 10: ziti.mgmt_pb.InspectResponse.values:type_name -> ziti.mgmt_pb.InspectResponse.InspectValue - 12, // 11: ziti.mgmt_pb.RaftMemberListResponse.members:type_name -> ziti.mgmt_pb.RaftMember - 22, // 12: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.intervalStartUTC:type_name -> google.protobuf.Timestamp - 22, // 13: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.intervalEndUTC:type_name -> google.protobuf.Timestamp - 20, // 14: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.values:type_name -> ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.ValuesEntry - 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 - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name + 25, // 10: ziti.mgmt_pb.InspectResponse.values:type_name -> ziti.mgmt_pb.InspectResponse.InspectValue + 13, // 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 + 26, // 13: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.intervalStartUTC:type_name -> google.protobuf.Timestamp + 26, // 14: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.intervalEndUTC:type_name -> google.protobuf.Timestamp + 24, // 15: ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.values:type_name -> ziti.mgmt_pb.StreamMetricsEvent.IntervalMetric.ValuesEntry + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_mgmt_proto_init() } @@ -1584,6 +1959,42 @@ func file_mgmt_proto_init() { } } file_mgmt_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateTerminatorsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mgmt_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidateTerminatorsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mgmt_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TerminatorDetail); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mgmt_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamMetricsRequest_MetricMatcher); i { case 0: return &v.state @@ -1595,7 +2006,7 @@ func file_mgmt_proto_init() { return nil } } - file_mgmt_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_mgmt_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamMetricsEvent_IntervalMetric); i { case 0: return &v.state @@ -1607,7 +2018,7 @@ func file_mgmt_proto_init() { return nil } } - file_mgmt_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_mgmt_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InspectResponse_InspectValue); i { case 0: return &v.state @@ -1626,8 +2037,8 @@ func file_mgmt_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_mgmt_proto_rawDesc, - NumEnums: 4, - NumMessages: 18, + NumEnums: 5, + NumMessages: 21, NumExtensions: 0, NumServices: 0, }, diff --git a/common/pb/mgmt_pb/mgmt.proto b/common/pb/mgmt_pb/mgmt.proto index 204386dca..28efb9213 100644 --- a/common/pb/mgmt_pb/mgmt.proto +++ b/common/pb/mgmt_pb/mgmt.proto @@ -43,6 +43,11 @@ enum ContentType { RaftRemovePeerRequestType = 10083; RaftTransferLeadershipRequestType = 10084; RaftInitFromDb = 10085; + + // Validate + ValidateTerminatorsRequestType = 10100; + ValidateTerminatorResponseType = 10101; + ValidateTerminatorResultType = 10102; } enum Header { @@ -156,4 +161,38 @@ message RaftMember { message RaftMemberListResponse { repeated RaftMember members = 1; +} + +message ValidateTerminatorsRequest { + string filter = 1; + bool fixInvalid = 2; +} + +message ValidateTerminatorsResponse { + bool success = 1; + string message = 2; + uint64 terminatorCount = 3; +} + +enum TerminatorState { + Valid = 0; + Unknown = 1; + InvalidUnknownBinding = 2; + InvalidUnknownTerminator = 3; + InvalidBadState = 4; +} + +message TerminatorDetail { + string terminatorId = 1; + string serviceId = 2; + string serviceName = 3; + string routerId = 4; + string routerName = 5; + string binding = 6; + string address = 7; + string hostId = 8; + string createDate = 9; + TerminatorState state = 10; + bool fixed = 11; + string detail = 12; } \ No newline at end of file diff --git a/controller/change/context.go b/controller/change/context.go index b200ab9c0..b7364fe64 100644 --- a/controller/change/context.go +++ b/controller/change/context.go @@ -18,8 +18,8 @@ package change import ( "context" - "github.com/openziti/ziti/common/pb/cmd_pb" "github.com/openziti/storage/boltz" + "github.com/openziti/ziti/common/pb/cmd_pb" ) type ContextKeyType string @@ -51,6 +51,7 @@ const ( const ( SourceTypeControlChannel = "ctrl.channel" SourceTypeRest = "rest" + SourceTypeWebSocket = "websocket" SourceTypeXt = "xt" ) diff --git a/controller/handler_edge_ctrl/create_terminator_v2.go b/controller/handler_edge_ctrl/create_terminator_v2.go index 27c585773..1b4fcf6c2 100644 --- a/controller/handler_edge_ctrl/create_terminator_v2.go +++ b/controller/handler_edge_ctrl/create_terminator_v2.go @@ -21,12 +21,14 @@ import ( "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v2" "github.com/openziti/channel/v2/protobufs" - "github.com/openziti/ziti/controller/models" - "github.com/openziti/ziti/controller/network" "github.com/openziti/ziti/common" "github.com/openziti/ziti/common/pb/edge_ctrl_pb" + "github.com/openziti/ziti/controller/db" "github.com/openziti/ziti/controller/env" + "github.com/openziti/ziti/controller/fields" "github.com/openziti/ziti/controller/model" + "github.com/openziti/ziti/controller/models" + "github.com/openziti/ziti/controller/network" "github.com/openziti/ziti/controller/persistence" "github.com/pkg/errors" "github.com/sirupsen/logrus" @@ -104,6 +106,21 @@ func (self *createTerminatorV2Handler) CreateTerminatorV2(ctx *CreateTerminatorV self.returnError(ctx, edge_ctrl_pb.CreateTerminatorResult_FailedIdConflict, ctx.err, logger) return } + + // if the precedence or cost has changed, update the terminator + if terminator.Precedence != ctx.req.GetXtPrecedence() || terminator.Cost != uint16(ctx.req.Cost) { + terminator.Precedence = ctx.req.GetXtPrecedence() + terminator.Cost = uint16(ctx.req.Cost) + err := self.appEnv.GetHostController().GetNetwork().Terminators.Update(terminator, fields.UpdatedFieldsMap{ + db.FieldTerminatorPrecedence: struct{}{}, + db.FieldTerminatorCost: struct{}{}, + }, ctx.newChangeContext()) + + if err != nil { + self.returnError(ctx, edge_ctrl_pb.CreateTerminatorResult_FailedOther, err, logger) + return + } + } } else { terminator = &network.Terminator{ BaseEntity: models.BaseEntity{ @@ -161,7 +178,7 @@ func (self *createTerminatorV2Handler) CreateTerminatorV2(ctx *CreateTerminatorV logger.WithError(err).Error("failed to send CreateTunnelTerminatorResponse") } - logger.Info("completed create tunnel terminator operation") + logger.Info("completed create terminator v2 operation") } func (self *createTerminatorV2Handler) returnError(ctx *CreateTerminatorV2RequestContext, resultType edge_ctrl_pb.CreateTerminatorResult, err error, logger *logrus.Entry) { diff --git a/controller/handler_mgmt/bind.go b/controller/handler_mgmt/bind.go index 2dbd639fc..251f09d77 100644 --- a/controller/handler_mgmt/bind.go +++ b/controller/handler_mgmt/bind.go @@ -18,9 +18,9 @@ package handler_mgmt import ( "github.com/openziti/channel/v2" + "github.com/openziti/ziti/common/trace" "github.com/openziti/ziti/controller/network" "github.com/openziti/ziti/controller/xmgmt" - "github.com/openziti/ziti/common/trace" ) type BindHandler struct { @@ -33,7 +33,17 @@ func NewBindHandler(network *network.Network, xmgmts []xmgmt.Xmgmt) channel.Bind } func (bindHandler *BindHandler) BindChannel(binding channel.Binding) error { - binding.AddTypedReceiveHandler(newInspectHandler(bindHandler.network)) + inspectRequestHandler := newInspectHandler(bindHandler.network) + binding.AddTypedReceiveHandler(&channel.AsyncFunctionReceiveAdapter{ + Type: inspectRequestHandler.ContentType(), + Handler: inspectRequestHandler.HandleReceive, + }) + + validateTerminatorsRequestHandler := newValidateTerminatorsHandler(bindHandler.network) + binding.AddTypedReceiveHandler(&channel.AsyncFunctionReceiveAdapter{ + Type: validateTerminatorsRequestHandler.ContentType(), + Handler: validateTerminatorsRequestHandler.HandleReceive, + }) tracesHandler := newStreamTracesHandler(bindHandler.network) binding.AddTypedReceiveHandler(tracesHandler) diff --git a/controller/handler_mgmt/inspect.go b/controller/handler_mgmt/inspect.go index f508db948..c0bcd6c29 100644 --- a/controller/handler_mgmt/inspect.go +++ b/controller/handler_mgmt/inspect.go @@ -20,8 +20,8 @@ import ( "fmt" "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v2" - "github.com/openziti/ziti/controller/network" "github.com/openziti/ziti/common/pb/mgmt_pb" + "github.com/openziti/ziti/controller/network" "google.golang.org/protobuf/proto" ) @@ -38,35 +38,33 @@ func (*inspectHandler) ContentType() int32 { } func (handler *inspectHandler) HandleReceive(msg *channel.Message, ch channel.Channel) { - go func() { - response := &mgmt_pb.InspectResponse{} - request := &mgmt_pb.InspectRequest{} - if err := proto.Unmarshal(msg.Body, request); err != nil { - response.Success = false - response.Errors = append(response.Errors, fmt.Sprintf("%v: %v", handler.network.GetAppId(), err)) - } else { - result := handler.network.Managers.Inspections.Inspect(request.AppRegex, request.RequestedValues) - response.Success = result.Success - response.Errors = result.Errors - for _, val := range result.Results { - response.Values = append(response.Values, &mgmt_pb.InspectResponse_InspectValue{ - AppId: val.AppId, - Name: val.Name, - Value: val.Value, - }) - } + response := &mgmt_pb.InspectResponse{} + request := &mgmt_pb.InspectRequest{} + if err := proto.Unmarshal(msg.Body, request); err != nil { + response.Success = false + response.Errors = append(response.Errors, fmt.Sprintf("%v: %v", handler.network.GetAppId(), err)) + } else { + result := handler.network.Managers.Inspections.Inspect(request.AppRegex, request.RequestedValues) + response.Success = result.Success + response.Errors = result.Errors + for _, val := range result.Results { + response.Values = append(response.Values, &mgmt_pb.InspectResponse_InspectValue{ + AppId: val.AppId, + Name: val.Name, + Value: val.Value, + }) } + } - body, err := proto.Marshal(response) - if err != nil { - pfxlog.Logger().Errorf("unexpected error serializing InspectResponse (%s)", err) - return - } + body, err := proto.Marshal(response) + if err != nil { + pfxlog.Logger().Errorf("unexpected error serializing InspectResponse (%s)", err) + return + } - responseMsg := channel.NewMessage(int32(mgmt_pb.ContentType_InspectResponseType), body) - responseMsg.ReplyTo(msg) - if err := ch.Send(responseMsg); err != nil { - pfxlog.Logger().Errorf("unexpected error sending InspectResponse (%s)", err) - } - }() + responseMsg := channel.NewMessage(int32(mgmt_pb.ContentType_InspectResponseType), body) + responseMsg.ReplyTo(msg) + if err = ch.Send(responseMsg); err != nil { + pfxlog.Logger().Errorf("unexpected error sending InspectResponse (%s)", err) + } } diff --git a/controller/handler_mgmt/validate_terminators.go b/controller/handler_mgmt/validate_terminators.go new file mode 100644 index 000000000..07023c320 --- /dev/null +++ b/controller/handler_mgmt/validate_terminators.go @@ -0,0 +1,84 @@ +/* + 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_mgmt + +import ( + "fmt" + "github.com/michaelquigley/pfxlog" + "github.com/openziti/channel/v2" + "github.com/openziti/channel/v2/protobufs" + "github.com/openziti/ziti/common/pb/mgmt_pb" + "github.com/openziti/ziti/controller/network" + "google.golang.org/protobuf/proto" + "time" +) + +type validateTerminatorsHandler struct { + network *network.Network +} + +func newValidateTerminatorsHandler(network *network.Network) *validateTerminatorsHandler { + return &validateTerminatorsHandler{network: network} +} + +func (*validateTerminatorsHandler) ContentType() int32 { + return int32(mgmt_pb.ContentType_ValidateTerminatorsRequestType) +} + +func (handler *validateTerminatorsHandler) HandleReceive(msg *channel.Message, ch channel.Channel) { + log := pfxlog.ContextLogger(ch.Label()) + request := &mgmt_pb.ValidateTerminatorsRequest{} + + var err error + var terminatorCount uint64 + + if err = proto.Unmarshal(msg.Body, request); err == nil { + terminatorCount, err = handler.network.Managers.Terminators.ValidateTerminators(request.Filter, request.FixInvalid, func(detail *mgmt_pb.TerminatorDetail) { + if !ch.IsClosed() { + if sendErr := protobufs.MarshalTyped(detail).WithTimeout(15 * time.Second).SendAndWaitForWire(ch); sendErr != nil { + log.WithError(sendErr).Error("send of terminator detail failed, closing channel") + if closeErr := ch.Close(); closeErr != nil { + log.WithError(closeErr).Error("failed to close channel") + } + } + } else { + log.Info("channel closed, unable to send terminator detail") + } + }) + } + + response := &mgmt_pb.ValidateTerminatorsResponse{} + if err == nil { + response.Success = true + response.TerminatorCount = terminatorCount + } else { + response.Success = false + response.Message = fmt.Sprintf("%v: failed to unmarshall request: %v", handler.network.GetAppId(), err) + } + + body, err := proto.Marshal(response) + if err != nil { + pfxlog.Logger().WithError(err).Error("unexpected error serializing ValidateTerminatorsResponse") + return + } + + responseMsg := channel.NewMessage(int32(mgmt_pb.ContentType_ValidateTerminatorResponseType), body) + responseMsg.ReplyTo(msg) + if err = ch.Send(responseMsg); err != nil { + pfxlog.Logger().WithError(err).Error("unexpected error sending ValidateTerminatorsResponse") + } +} diff --git a/controller/network/terminator.go b/controller/network/terminator.go index e42bd7087..257227b17 100644 --- a/controller/network/terminator.go +++ b/controller/network/terminator.go @@ -14,21 +14,28 @@ package network import ( + "context" + "fmt" "github.com/michaelquigley/pfxlog" + "github.com/openziti/channel/v2" + "github.com/openziti/channel/v2/protobufs" + "github.com/openziti/foundation/v2/errorz" + "github.com/openziti/storage/boltz" + "github.com/openziti/ziti/common/pb/cmd_pb" + "github.com/openziti/ziti/common/pb/ctrl_pb" + "github.com/openziti/ziti/common/pb/mgmt_pb" "github.com/openziti/ziti/controller/change" "github.com/openziti/ziti/controller/command" "github.com/openziti/ziti/controller/db" "github.com/openziti/ziti/controller/fields" "github.com/openziti/ziti/controller/models" "github.com/openziti/ziti/controller/xt" - "github.com/openziti/ziti/common/pb/cmd_pb" - "github.com/openziti/foundation/v2/errorz" - "github.com/openziti/storage/boltz" "github.com/pkg/errors" "go.etcd.io/bbolt" "google.golang.org/protobuf/proto" "reflect" "strings" + "time" ) type Terminator struct { @@ -368,6 +375,117 @@ func (self *TerminatorManager) Unmarshall(bytes []byte) (*Terminator, error) { return result, nil } +type ValidationCallback func(detail *mgmt_pb.TerminatorDetail) + +func (self *TerminatorManager) ValidateTerminators(filter string, fixInvalid bool, cb ValidationCallback) (uint64, error) { + if filter == "" { + filter = "true limit none" + } + result, err := self.BaseList(filter) + if err != nil { + return 0, err + } + + go func() { + batches := map[string][]*Terminator{} + + for _, terminator := range result.Entities { + routerId := terminator.Router + batch := append(batches[routerId], terminator) + batches[routerId] = batch + if len(batch) == 50 { + self.validateTerminatorBatch(fixInvalid, routerId, batch, cb) + delete(batches, routerId) + } + } + + for routerId, batch := range batches { + self.validateTerminatorBatch(fixInvalid, routerId, batch, cb) + } + }() + + return uint64(len(result.Entities)), nil +} + +func (self *TerminatorManager) validateTerminatorBatch(fixInvalid bool, routerId string, batch []*Terminator, cb ValidationCallback) { + router := self.Managers.Routers.getConnected(routerId) + if router == nil { + self.reportError(router, batch, cb, "router off-line") + return + } + + request := &ctrl_pb.ValidateTerminatorsV2Request{ + FixInvalid: fixInvalid, + } + for _, terminator := range batch { + request.Terminators = append(request.Terminators, &ctrl_pb.Terminator{ + Id: terminator.Id, + Binding: terminator.Binding, + Address: terminator.Address, + }) + } + + b, err := proto.Marshal(request) + if err != nil { + self.reportError(router, batch, cb, fmt.Sprintf("failed to marshal %s: %s", reflect.TypeOf(request), err.Error())) + return + } + + msg := channel.NewMessage(int32(ctrl_pb.ContentType_ValidateTerminatorsV2RequestType), b) + envelope := &ValidateTerminatorRequestSendable{ + Message: msg, + fixInvalid: fixInvalid, + cb: cb, + mgr: self, + router: router, + terminators: batch, + } + envelope.ctx, envelope.cancelF = context.WithTimeout(context.Background(), time.Minute) + + if err = router.Control.Send(envelope); err != nil { + self.reportError(router, batch, cb, fmt.Sprintf("failed to send %s: %s", reflect.TypeOf(request), err.Error())) + return + } +} + +func (self *TerminatorManager) reportError(router *Router, batch []*Terminator, cb ValidationCallback, err string) { + for _, terminator := range batch { + detail := self.newTerminatorDetail(router, terminator) + detail.State = mgmt_pb.TerminatorState_Unknown + detail.Detail = err + cb(detail) + } +} + +func (self *TerminatorManager) newTerminatorDetail(router *Router, terminator *Terminator) *mgmt_pb.TerminatorDetail { + detail := &mgmt_pb.TerminatorDetail{ + TerminatorId: terminator.Id, + ServiceId: terminator.Service, + ServiceName: "unable to retrieve", + RouterId: terminator.Router, + RouterName: "unable to retrieve", + Binding: terminator.Binding, + Address: terminator.Address, + HostId: terminator.HostId, + CreateDate: terminator.CreatedAt.Format(time.RFC3339), + } + + service, _ := self.Services.Read(terminator.Service) + if service != nil { + detail.ServiceName = service.Name + } + + if router == nil { + router, _ = self.Routers.Read(terminator.Router) + } + + if router != nil { + detail.RouterName = router.Name + } + + return detail +} + type TerminatorListResult struct { controller *TerminatorManager Entities []*Terminator @@ -420,3 +538,83 @@ func (self *DeleteTerminatorsBatchCommand) Decode(n *Network, msg *cmd_pb.Delete func (self *DeleteTerminatorsBatchCommand) GetChangeContext() *change.Context { return self.Context } + +type ValidateTerminatorRequestSendable struct { + channel.BaseSendListener + *channel.Message + fixInvalid bool + mgr *TerminatorManager + router *Router + terminators []*Terminator + cb ValidationCallback + ctx context.Context + cancelF func() +} + +func (self *ValidateTerminatorRequestSendable) AcceptReply(message *channel.Message) { + self.cancelF() + + response := &ctrl_pb.ValidateTerminatorsV2Response{} + if err := protobufs.TypedResponse(response).Unmarshall(message, nil); err != nil { + pfxlog.Logger().WithError(err).Error("unable to unmarshall validate terminators v2 response") + return + } + + var invalidIds []string + + for _, terminator := range self.terminators { + if status := response.States[terminator.Id]; status != nil && !status.Valid { + invalidIds = append(invalidIds, terminator.Id) + } + } + + fixed := false + + if self.fixInvalid && len(invalidIds) > 0 { + // todo: figure out how to inject change context from outside of websocket context + changeCtx := change.New().SetSourceType(change.SourceTypeWebSocket).SetChangeAuthorId(change.AuthorTypeUnattributed) + err := self.mgr.DeleteBatch(invalidIds, changeCtx) + if err != nil { + pfxlog.Logger().WithError(err).Error("unable to batch delete invalid terminators") + } else { + fixed = true + } + } + + for _, terminator := range self.terminators { + detail := self.mgr.newTerminatorDetail(self.router, terminator) + if status := response.States[terminator.Id]; status != nil { + if status.Valid { + detail.State = mgmt_pb.TerminatorState_Valid + } else if status.Reason == ctrl_pb.TerminatorInvalidReason_UnknownBinding { + detail.State = mgmt_pb.TerminatorState_InvalidUnknownBinding + } else if status.Reason == ctrl_pb.TerminatorInvalidReason_UnknownTerminator { + detail.State = mgmt_pb.TerminatorState_InvalidUnknownTerminator + } else if status.Reason == ctrl_pb.TerminatorInvalidReason_BadState { + detail.State = mgmt_pb.TerminatorState_InvalidBadState + } else { + detail.State = mgmt_pb.TerminatorState_Unknown + } + + if !status.Valid { + detail.Fixed = fixed + } + detail.Detail = status.Detail + } else { + detail.State = mgmt_pb.TerminatorState_Unknown + } + self.cb(detail) + } +} + +func (self *ValidateTerminatorRequestSendable) Context() context.Context { + return self.ctx +} + +func (self *ValidateTerminatorRequestSendable) SendListener() channel.SendListener { + return self +} + +func (self *ValidateTerminatorRequestSendable) ReplyReceiver() channel.ReplyReceiver { + return self +} diff --git a/go.mod b/go.mod index 45476153a..f43da691c 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/dineshappavoo/basex v0.0.0-20170425072625-481a6f6dc663 github.com/ef-ds/deque v1.0.4 github.com/emirpasic/gods v1.18.1 - github.com/fatih/color v1.15.0 + github.com/fatih/color v1.16.0 github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa github.com/go-acme/lego/v4 v4.14.2 github.com/go-openapi/errors v0.20.4 @@ -30,8 +30,8 @@ require ( github.com/google/gopacket v1.1.19 github.com/google/uuid v1.4.0 github.com/gorilla/handlers v1.5.1 - github.com/gorilla/mux v1.8.0 - github.com/gorilla/websocket v1.5.0 + github.com/gorilla/mux v1.8.1 + github.com/gorilla/websocket v1.5.1 github.com/hashicorp/go-hclog v1.5.0 github.com/hashicorp/golang-lru/v2 v2.0.7 github.com/hashicorp/raft v1.5.0 @@ -47,17 +47,17 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/natefinch/lumberjack v2.0.0+incompatible github.com/openziti/agent v1.0.16 - github.com/openziti/channel/v2 v2.0.105 - github.com/openziti/edge-api v0.26.0 - github.com/openziti/foundation/v2 v2.0.33 - github.com/openziti/identity v1.0.66 + github.com/openziti/channel/v2 v2.0.110 + github.com/openziti/edge-api v0.26.1 + github.com/openziti/foundation/v2 v2.0.35 + github.com/openziti/identity v1.0.68 github.com/openziti/jwks v1.0.3 - github.com/openziti/metrics v1.2.37 + github.com/openziti/metrics v1.2.40 github.com/openziti/runzmd v1.0.33 - github.com/openziti/sdk-golang v0.20.129 - github.com/openziti/secretstream v0.1.13 + github.com/openziti/sdk-golang v0.20.139 + github.com/openziti/secretstream v0.1.14 github.com/openziti/storage v0.2.23 - github.com/openziti/transport/v2 v2.0.113 + github.com/openziti/transport/v2 v2.0.119 github.com/openziti/x509-claims v1.0.3 github.com/openziti/xweb/v2 v2.1.0 github.com/openziti/ziti-db-explorer v1.1.3 @@ -66,10 +66,10 @@ require ( github.com/rabbitmq/amqp091-go v1.8.1 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 github.com/russross/blackfriday v1.6.0 - github.com/shirou/gopsutil/v3 v3.23.9 + github.com/shirou/gopsutil/v3 v3.23.10 github.com/sirupsen/logrus v1.9.3 github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e - github.com/spf13/cobra v1.7.0 + github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.17.0 github.com/stretchr/testify v1.8.4 @@ -77,11 +77,11 @@ require ( github.com/xeipuuv/gojsonschema v1.2.0 github.com/zitadel/oidc/v2 v2.7.0 go.etcd.io/bbolt v1.3.8 - golang.org/x/crypto v0.14.0 - golang.org/x/net v0.17.0 + golang.org/x/crypto v0.16.0 + golang.org/x/net v0.19.0 golang.org/x/sync v0.4.0 - golang.org/x/sys v0.13.0 - golang.org/x/text v0.13.0 + golang.org/x/sys v0.15.0 + golang.org/x/text v0.14.0 google.golang.org/protobuf v1.31.0 gopkg.in/AlecAivazis/survey.v1 v1.8.7 gopkg.in/resty.v1 v1.12.0 @@ -110,7 +110,7 @@ require ( github.com/eliukblau/pixterm/pkg/ansimage v0.0.0-20191210081756-9fb6cf8c2f75 // indirect github.com/felixge/httpsnoop v1.0.1 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-jose/go-jose/v3 v3.0.0 // indirect + github.com/go-jose/go-jose/v3 v3.0.1 // indirect github.com/go-logr/logr v1.3.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect @@ -170,18 +170,18 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect - go.mongodb.org/mongo-driver v1.12.1 // indirect + go.mongodb.org/mongo-driver v1.13.0 // indirect go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 // indirect - go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/metric v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.opentelemetry.io/otel v1.20.0 // indirect + go.opentelemetry.io/otel/metric v1.20.0 // indirect + go.opentelemetry.io/otel/trace v1.20.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.9.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect golang.org/x/image v0.13.0 // indirect golang.org/x/mod v0.13.0 // indirect golang.org/x/oauth2 v0.12.0 // indirect - golang.org/x/term v0.13.0 // indirect + golang.org/x/term v0.15.0 // indirect golang.org/x/tools v0.14.0 // indirect google.golang.org/appengine v1.6.7 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index ae3db55fa..f528d5607 100644 --- a/go.sum +++ b/go.sum @@ -137,7 +137,7 @@ github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7 github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= @@ -181,8 +181,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= @@ -206,8 +206,8 @@ github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo= -github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= +github.com/go-jose/go-jose/v3 v3.0.1 h1:pWmKFVtt+Jl0vBZTIpz/eAKwsm6LkIxDVVbFHKkchhA= +github.com/go-jose/go-jose/v3 v3.0.1/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -382,15 +382,15 @@ github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/schema v1.2.0 h1:YufUaxZYCKGFuAq3c96BOhjgd5nmXiOY9NGzF247Tsc= github.com/gorilla/schema v1.2.0/go.mod h1:kgLaKoK1FELgZqMAVxx/5cbj0kT+57qxUrAlIO2eleU= github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= @@ -616,30 +616,30 @@ github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYr github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openziti/agent v1.0.16 h1:9Saji+8hFE1NpzP2XzDhsVJbCrDlhixoLHfOpFt5Z+U= github.com/openziti/agent v1.0.16/go.mod h1:zfm53+PVWoGFzjGGgQdKby5749G6VRYHe+eQJmoVKy4= -github.com/openziti/channel/v2 v2.0.105 h1:WT2zFF7krZkYUfuXA+4tQxhYiiVWlldD3mKX3qJU9Ww= -github.com/openziti/channel/v2 v2.0.105/go.mod h1:++bV6FFgGUNxaBu7iOkkCa6rSiueU34Kd6f2LSCrEtU= +github.com/openziti/channel/v2 v2.0.110 h1:vBEesJe3XZhdGwa0PRaZBdwOetvmp1m+oIW9gwLEa4k= +github.com/openziti/channel/v2 v2.0.110/go.mod h1:abw0qwT0MzWvh1eI2P6D6CD17PRHL8EEo1d3DHCyCdM= github.com/openziti/dilithium v0.3.3 h1:PLgQ6PMNLSTzCFbX/h98cmudgz/cU6TmjdSv5NAPD8k= github.com/openziti/dilithium v0.3.3/go.mod h1:vsCjI2AU/hon9e+dLhUFbCNGesJDj2ASgkySOcpmvjo= -github.com/openziti/edge-api v0.26.0 h1:082hXjj8rnyMBZHYiB6jb4n7mCXtdMXpF2iCqZOv4IM= -github.com/openziti/edge-api v0.26.0/go.mod h1:/e1pK92L471fvOAwE/hLX5sqBuuo+NwI8vmL04dUHsM= -github.com/openziti/foundation/v2 v2.0.33 h1:8CP+fi4KsmzA4jDi54jibwFWWxKpd0rSiplzN9Z0Isw= -github.com/openziti/foundation/v2 v2.0.33/go.mod h1:dWR0g3NOka3uKz9MgUHq6dmuRLmSvunkyeuOXEW/5qU= -github.com/openziti/identity v1.0.66 h1:wCIVNCoiHmeicC9yM15FC0xe6jSic879ztN63fSD6hM= -github.com/openziti/identity v1.0.66/go.mod h1:grReHVqBwhECrnrAZCxNw4ZpA2I1ox66tYfPkfGuKJY= +github.com/openziti/edge-api v0.26.1 h1:osj2irTMMvoP5jLQwJOIKFEellK6AFyT6wB0NzDdalY= +github.com/openziti/edge-api v0.26.1/go.mod h1:bHEkOF9UTjGgjHhmsjnxxNybdijJ91jpdG1WFc9morU= +github.com/openziti/foundation/v2 v2.0.35 h1:4VaMwZ2kAy6jwBYeQIBN2m8rcGroTDX4A2Jp7NAKb6M= +github.com/openziti/foundation/v2 v2.0.35/go.mod h1:Xnb3IxP1e1UcgLggqSunEpCjH3iHozkPi9Bd9GESbwo= +github.com/openziti/identity v1.0.68 h1:SaFr7BeFQBoWQDiT28vUb8D9w7v6lIAK6/9RkwmV0OU= +github.com/openziti/identity v1.0.68/go.mod h1:HbOu3TQ032v8xE6xZWjO51azF4fUxRLjO/l/oGqJwUI= github.com/openziti/jwks v1.0.3 h1:hf8wkb+Cg4nH/HM0KROFd7u+C3DkRVcFZJ7tDV+4icc= github.com/openziti/jwks v1.0.3/go.mod h1:t4xxq8vlXGsPn29kiQVnZBBDDnEoOFqtJoHibkJunQQ= -github.com/openziti/metrics v1.2.37 h1:5yWvMwQT6X43LDlNVcUtqAPJQXfKtbWSYoCIiOfXztg= -github.com/openziti/metrics v1.2.37/go.mod h1:jIL9iilxby8tR98C18uZaSe6bRG15ItR8XF2hmMt8vs= +github.com/openziti/metrics v1.2.40 h1:gySRgR8prCPqaEjmUtX0eXFs7NkI9uPAzp+z6A8+JqA= +github.com/openziti/metrics v1.2.40/go.mod h1:HXdVryf3xpZfnY4VcaOjMxiBv+qw0wJlEJNLbooB9hY= github.com/openziti/runzmd v1.0.33 h1:tOyjRoUuVXIo1z1pNU32jALWkMmhzsSaDrhLtuOn3Ts= github.com/openziti/runzmd v1.0.33/go.mod h1:8c/uvZR/XWXQNllTq6LuTpfKL2DTNxfI2X2wYhgRwik= -github.com/openziti/sdk-golang v0.20.129 h1:FjvXsGFxEiHq89sNyLSvNymruACFW5tbhkgZ3VCg2pE= -github.com/openziti/sdk-golang v0.20.129/go.mod h1:ZpJ7HCcIQbp8XiSno3YXkfhoDIbgjCjS2ScK2bda8eo= -github.com/openziti/secretstream v0.1.13 h1:grp53Q5gCFPXv6okwWHDVvqBBk2BhD0ikHwfV3Adhnc= -github.com/openziti/secretstream v0.1.13/go.mod h1:M4DYavDc3TVF/eemNqp5Fa+zGuYTNa0HTGSz/GkgUzA= +github.com/openziti/sdk-golang v0.20.139 h1:1TaRTd5KmSrfHR6W3ASuj651o37h4NOXTRC6K53Pf3k= +github.com/openziti/sdk-golang v0.20.139/go.mod h1:z2gUWwonLa+haq40cfsNE2P23RoD+SZhxWulG7w7aI0= +github.com/openziti/secretstream v0.1.14 h1:Ta+nB5Prcct+L5LIKUA1nE56QhWS6lMPQYTlpxUltU0= +github.com/openziti/secretstream v0.1.14/go.mod h1:/hhuLfu+GIv0+cnapfsu/VOnXEvmTt3GKtCu+lQ0RIw= github.com/openziti/storage v0.2.23 h1:R5ZBGDGC/LvOz3fE/GlevwbPZ3HL7VxYEvlhKuezvNU= github.com/openziti/storage v0.2.23/go.mod h1:NZCrN2dLtRU73McVEflK5prDgYds9J54mMNz5DmgvZE= -github.com/openziti/transport/v2 v2.0.113 h1:xFPd1W00KqkFb62rRsRXmLqfgr9d9uk0CAVZegvtGhA= -github.com/openziti/transport/v2 v2.0.113/go.mod h1:TSDHV7RTGg/FinzfOP8cg86O53BCabXedANh3eUNics= +github.com/openziti/transport/v2 v2.0.119 h1:KOgHU+9EZUVPvv8ncifqHmNEcFUHbJHigo3jyPvWnOc= +github.com/openziti/transport/v2 v2.0.119/go.mod h1:H2IIBP6ed9isE/eJHGXtAZL0d73ApYOpLG9sSvutNNI= github.com/openziti/x509-claims v1.0.3 h1:HNdQ8Nf1agB3lBs1gahcO6zfkeS4S5xoQ2/PkY4HRX0= github.com/openziti/x509-claims v1.0.3/go.mod h1:Z0WIpBm6c4ecrpRKrou6Gk2wrLWxJO/+tuUwKh8VewE= github.com/openziti/xweb/v2 v2.1.0 h1:Xhh3C2pZkq/Prr65V+SfFSibLDYteoc4f62KQCcTZF4= @@ -728,8 +728,8 @@ github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6g github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shirou/gopsutil/v3 v3.23.9 h1:ZI5bWVeu2ep4/DIxB4U9okeYJ7zp/QLTO4auRb/ty/E= -github.com/shirou/gopsutil/v3 v3.23.9/go.mod h1:x/NWSb71eMcjFIO0vhyGW5nZ7oSIgVjrCnADckb85GA= +github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= +github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= @@ -788,8 +788,8 @@ github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -875,8 +875,8 @@ go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsX go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= -go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecqgE= -go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= +go.mongodb.org/mongo-driver v1.13.0 h1:67DgFFjYOCMWdtTEmKFpV3ffWlFnh+CYZ8ZS/tXWUfY= +go.mongodb.org/mongo-driver v1.13.0/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 h1:CCriYyAfq1Br1aIYettdHZTy8mBTIPo7We18TuO/bak= go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= @@ -887,13 +887,13 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= +go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= +go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= +go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= +go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= @@ -933,8 +933,9 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1035,8 +1036,9 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1155,16 +1157,17 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1178,8 +1181,9 @@ golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/router/env/env.go b/router/env/env.go index b40368524..2dc39f18b 100644 --- a/router/env/env.go +++ b/router/env/env.go @@ -18,11 +18,12 @@ package env import ( "github.com/openziti/channel/v2" - "github.com/openziti/ziti/router/xgress" - "github.com/openziti/ziti/router/xlink" "github.com/openziti/foundation/v2/goroutines" + "github.com/openziti/foundation/v2/versions" "github.com/openziti/identity" "github.com/openziti/metrics" + "github.com/openziti/ziti/router/xgress" + "github.com/openziti/ziti/router/xlink" ) type RouterEnv interface { @@ -38,4 +39,5 @@ type RouterEnv interface { RenderJsonConfig() (string, error) GetHeartbeatOptions() HeartbeatOptions GetRateLimiterPool() goroutines.Pool + GetVersionInfo() versions.VersionProvider } diff --git a/router/handler_ctrl/bind.go b/router/handler_ctrl/bind.go index 866548cc7..1a2c1de74 100644 --- a/router/handler_ctrl/bind.go +++ b/router/handler_ctrl/bind.go @@ -22,11 +22,11 @@ import ( "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v2" + "github.com/openziti/foundation/v2/goroutines" "github.com/openziti/ziti/common/metrics" + "github.com/openziti/ziti/common/trace" "github.com/openziti/ziti/router/env" "github.com/openziti/ziti/router/forwarder" - "github.com/openziti/ziti/common/trace" - "github.com/openziti/foundation/v2/goroutines" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -70,6 +70,7 @@ func (self *bindHandler) BindChannel(binding channel.Binding) error { binding.AddTypedReceiveHandler(newDialHandler(self.env)) binding.AddTypedReceiveHandler(newRouteHandler(binding.GetChannel(), self.env, self.forwarder, self.xgDialerPool)) binding.AddTypedReceiveHandler(newValidateTerminatorsHandler(self.env)) + binding.AddTypedReceiveHandler(newValidateTerminatorsV2Handler(self.env)) binding.AddTypedReceiveHandler(newUnrouteHandler(self.forwarder)) binding.AddTypedReceiveHandler(newTraceHandler(self.env.GetRouterId(), self.forwarder.TraceController(), binding.GetChannel())) binding.AddTypedReceiveHandler(newInspectHandler(self.env, self.forwarder)) diff --git a/router/handler_ctrl/validate_terminators_v2.go b/router/handler_ctrl/validate_terminators_v2.go new file mode 100644 index 000000000..0a06666d2 --- /dev/null +++ b/router/handler_ctrl/validate_terminators_v2.go @@ -0,0 +1,111 @@ +/* + 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_ctrl + +import ( + "github.com/michaelquigley/pfxlog" + "github.com/openziti/channel/v2" + "github.com/openziti/channel/v2/protobufs" + "github.com/openziti/ziti/common/pb/ctrl_pb" + "github.com/openziti/ziti/router/env" + "github.com/openziti/ziti/router/xgress" + "google.golang.org/protobuf/proto" +) + +type validateTerminatorsV2Handler struct { + env env.RouterEnv +} + +func newValidateTerminatorsV2Handler(env env.RouterEnv) *validateTerminatorsV2Handler { + return &validateTerminatorsV2Handler{ + env: env, + } +} + +func (handler *validateTerminatorsV2Handler) ContentType() int32 { + return int32(ctrl_pb.ContentType_ValidateTerminatorsV2RequestType) +} + +func (handler *validateTerminatorsV2Handler) HandleReceive(msg *channel.Message, ch channel.Channel) { + log := pfxlog.ContextLogger(ch.Label()) + + req := &ctrl_pb.ValidateTerminatorsV2Request{} + if err := proto.Unmarshal(msg.Body, req); err != nil { + log.Errorf("error unmarshaling validate terminators V2 msg (%v)", err) + return + } + + // because this sends AND receives messages, must be done async, otherwise message responses will never + // be received, as this handler will block processing + go handler.validateTerminators(msg, ch, req) +} + +func (handler *validateTerminatorsV2Handler) validateTerminators(msg *channel.Message, ch channel.Channel, req *ctrl_pb.ValidateTerminatorsV2Request) { + log := pfxlog.ContextLogger(ch.Label()) + + log.Debugf("validate terminators route request received: %v terminators", len(req.Terminators)) + dialers := map[string]xgress.Dialer{} + + response := &ctrl_pb.ValidateTerminatorsV2Response{ + States: map[string]*ctrl_pb.RouterTerminatorState{}, + } + + for _, terminator := range req.Terminators { + binding := terminator.Binding + dialer := dialers[binding] + if dialer == nil { + if factory, err := xgress.GlobalRegistry().Factory(binding); err == nil { + if dialer, err = factory.CreateDialer(handler.env.GetDialerCfg()[binding]); err == nil { + dialers[binding] = dialer + } + } + } + + if dialer == nil { + response.States[terminator.Id] = &ctrl_pb.RouterTerminatorState{ + Valid: false, + Reason: ctrl_pb.TerminatorInvalidReason_UnknownBinding, + } + } else if inspectable, ok := dialer.(xgress.InspectableDialer); ok { + valid, state := inspectable.InspectTerminator(terminator.Id, terminator.Address, req.FixInvalid) + response.States[terminator.Id] = &ctrl_pb.RouterTerminatorState{ + Valid: valid, + Detail: state, + Reason: ctrl_pb.TerminatorInvalidReason_UnknownTerminator, + } + } else if !dialer.IsTerminatorValid(terminator.Id, terminator.Address) { + response.States[terminator.Id] = &ctrl_pb.RouterTerminatorState{ + Valid: false, + Reason: ctrl_pb.TerminatorInvalidReason_UnknownTerminator, + } + } else { + response.States[terminator.Id] = &ctrl_pb.RouterTerminatorState{ + Valid: true, + Detail: "valid", + } + } + } + + err := protobufs.MarshalTyped(response). + ReplyTo(msg). + WithTimeout(handler.env.GetNetworkControllers().DefaultRequestTimeout()). + SendAndWaitForWire(ch) + + if err != nil { + log.WithError(err).Error("failed to send validate terminators v2 response") + } +} diff --git a/router/xgress/xgress.go b/router/xgress/xgress.go index d9f2a132b..b6ae4b170 100644 --- a/router/xgress/xgress.go +++ b/router/xgress/xgress.go @@ -30,13 +30,13 @@ import ( "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v2" - "github.com/openziti/ziti/controller/xt" - "github.com/openziti/ziti/common/inspect" - "github.com/openziti/ziti/common/logcontext" "github.com/openziti/foundation/v2/concurrenz" "github.com/openziti/foundation/v2/debugz" "github.com/openziti/foundation/v2/info" "github.com/openziti/identity" + "github.com/openziti/ziti/common/inspect" + "github.com/openziti/ziti/common/logcontext" + "github.com/openziti/ziti/controller/xt" "github.com/sirupsen/logrus" ) @@ -72,6 +72,11 @@ type Dialer interface { IsTerminatorValid(id string, destination string) bool } +type InspectableDialer interface { + Dialer + InspectTerminator(id string, destination string, fixInvalid bool) (bool, string) +} + type Factory interface { CreateListener(optionsData OptionsData) (Listener, error) CreateDialer(optionsData OptionsData) (Dialer, error) diff --git a/router/xgress_edge/accept.go b/router/xgress_edge/accept.go index a13d22994..dc10b7f6a 100644 --- a/router/xgress_edge/accept.go +++ b/router/xgress_edge/accept.go @@ -21,8 +21,8 @@ import ( "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v2" "github.com/openziti/channel/v2/latency" - "github.com/openziti/ziti/common/cert" "github.com/openziti/sdk-golang/ziti/edge" + "github.com/openziti/ziti/common/cert" "math" ) diff --git a/router/xgress_edge/dialer.go b/router/xgress_edge/dialer.go index b5197d9c8..4967ac050 100644 --- a/router/xgress_edge/dialer.go +++ b/router/xgress_edge/dialer.go @@ -23,10 +23,10 @@ import ( "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v2" + "github.com/openziti/sdk-golang/ziti/edge" "github.com/openziti/ziti/common/logcontext" "github.com/openziti/ziti/controller/xt" "github.com/openziti/ziti/router/xgress" - "github.com/openziti/sdk-golang/ziti/edge" "github.com/pkg/errors" ) @@ -36,10 +36,30 @@ type dialer struct { } func (dialer *dialer) IsTerminatorValid(id string, destination string) bool { + valid, _ := dialer.InspectTerminator(id, destination, true) + return valid +} + +func (dialer *dialer) InspectTerminator(id string, destination string, fixInvalid bool) (bool, string) { terminatorAddress := strings.TrimPrefix(destination, "hosted:") pfxlog.Logger().Debug("looking up hosted service conn") terminator, found := dialer.factory.hostedServices.Get(terminatorAddress) - return found && terminator.terminatorId.Load() == id + if found && terminator.terminatorId.Load() == id { + updated := terminator.state.CompareAndSwap(TerminatorStateEstablishing, TerminatorStateEstablished) || + terminator.state.CompareAndSwap(TerminatorStatePendingEstablishment, TerminatorStateEstablished) + + if updated { + dialer.factory.hostedServices.notifyTerminatorCreated(id) + } + + result, err := terminator.inspect(fixInvalid) + if err != nil { + return true, err.Error() + } + return result.Type == edge.ConnTypeBind, result.Detail + } + + return false, "terminator not found" } func newDialer(factory *Factory, options *Options) xgress.Dialer { diff --git a/router/xgress_edge/fabric.go b/router/xgress_edge/fabric.go index c8a3640dc..229adf774 100644 --- a/router/xgress_edge/fabric.go +++ b/router/xgress_edge/fabric.go @@ -19,14 +19,16 @@ package xgress_edge import ( "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v2" - "github.com/openziti/ziti/router/xgress_common" - "github.com/openziti/ziti/router/xgress" "github.com/openziti/foundation/v2/concurrenz" "github.com/openziti/sdk-golang/ziti/edge" + "github.com/openziti/ziti/common/pb/edge_ctrl_pb" + "github.com/openziti/ziti/router/xgress" + "github.com/openziti/ziti/router/xgress_common" "github.com/pkg/errors" "io" "math" "sync/atomic" + "time" ) // headers to pass through fabric to the other side @@ -38,15 +40,60 @@ var headersFromFabric = map[uint8]int32{ xgress_common.PayloadFlagsHeader: edge.FlagsHeader, } +type terminatorState int + +const ( + TerminatorStatePendingEstablishment terminatorState = 0 + TerminatorStateEstablishing terminatorState = 1 + TerminatorStateEstablished terminatorState = 2 + TerminatorStateDeleting terminatorState = 3 +) + +func (self terminatorState) String() string { + switch self { + case TerminatorStatePendingEstablishment: + return "pending-establishment" + case TerminatorStateEstablishing: + return "establishing" + case TerminatorStateEstablished: + return "established" + case TerminatorStateDeleting: + return "deleting" + default: + return "unknown" + } +} + type edgeTerminator struct { edge.MsgChannel edgeClientConn *edgeClientConn + terminatorId concurrenz.AtomicValue[string] + listenerId string token string instance string - terminatorId concurrenz.AtomicValue[string] + instanceSecret []byte + cost uint16 + precedence edge_ctrl_pb.TerminatorPrecedence + hostData map[uint32][]byte assignIds bool onClose func() v2 bool + state concurrenz.AtomicValue[terminatorState] + postValidate bool +} + +func (self *edgeTerminator) inspect(fixInvalidTerminators bool) (*edge.InspectResult, error) { + msg := channel.NewMessage(edge.ContentTypeConnInspectRequest, nil) + msg.PutUint32Header(edge.ConnIdHeader, self.Id()) + resp, err := msg.WithTimeout(10 * time.Second).SendForReply(self.Channel) + if err != nil { + return nil, errors.New("unable to check status with sdk client") + } + result, err := edge.UnmarshalInspectResult(resp) + if result != nil && result.Type != edge.ConnTypeBind && fixInvalidTerminators { + self.close(true, "terminator invalid") + } + return result, err } func (self *edgeTerminator) nextDialConnId() uint32 { @@ -61,7 +108,8 @@ func (self *edgeTerminator) nextDialConnId() uint32 { func (self *edgeTerminator) close(notify bool, reason string) { logger := pfxlog.Logger(). WithField("terminatorId", self.terminatorId.Load()). - WithField("token", self.token) + WithField("token", self.token). + WithField("reason", reason) if notify && !self.IsClosed() { // Notify edge client of close @@ -75,6 +123,10 @@ func (self *edgeTerminator) close(notify bool, reason string) { if self.v2 { if terminatorId := self.terminatorId.Load(); terminatorId != "" { if self.terminatorId.CompareAndSwap(terminatorId, "") { + logger.Debug("removing terminator on router") + self.edgeClientConn.listener.factory.hostedServices.Delete(terminatorId) + + self.state.Store(TerminatorStateDeleting) logger.Info("removing terminator on controller") ctrlCh := self.edgeClientConn.listener.factory.ctrls.AnyCtrlChannel() if ctrlCh == nil { @@ -82,14 +134,11 @@ func (self *edgeTerminator) close(notify bool, reason string) { } else if err := self.edgeClientConn.removeTerminator(ctrlCh, self.token, terminatorId); err != nil { logger.WithError(err).Error("failed to remove terminator") } else { - logger.Info("Successfully removed terminator on channel close") + logger.Info("Successfully removed terminator") } } else { logger.Warn("edge terminator closing, but no terminator id set, so can't remove on controller") } - - logger.Debug("removing terminator on router") - self.edgeClientConn.listener.factory.hostedServices.Delete(self.token) } } else { if terminatorId := self.terminatorId.Load(); terminatorId != "" { @@ -100,7 +149,7 @@ func (self *edgeTerminator) close(notify bool, reason string) { } else if err := self.edgeClientConn.removeTerminator(ctrlCh, self.token, terminatorId); err != nil { logger.WithError(err).Error("failed to remove terminator") } else { - logger.Info("Successfully removed terminator on channel close") + logger.Info("successfully removed terminator") } } else { logger.Warn("edge terminator closing, but no terminator id set, so can't remove on controller") diff --git a/router/xgress_edge/factory.go b/router/xgress_edge/factory.go index ea25f7dc7..2ad1b8666 100644 --- a/router/xgress_edge/factory.go +++ b/router/xgress_edge/factory.go @@ -20,24 +20,23 @@ import ( "fmt" "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v2" + "github.com/openziti/foundation/v2/versions" + "github.com/openziti/metrics" + "github.com/openziti/transport/v2" + "github.com/openziti/ziti/common/pb/edge_ctrl_pb" + "github.com/openziti/ziti/router" + "github.com/openziti/ziti/router/env" "github.com/openziti/ziti/router/fabric" "github.com/openziti/ziti/router/handler_edge_ctrl" "github.com/openziti/ziti/router/internal/apiproxy" "github.com/openziti/ziti/router/internal/edgerouter" - "github.com/openziti/ziti/router" - "github.com/openziti/ziti/router/env" "github.com/openziti/ziti/router/xgress" - "github.com/openziti/foundation/v2/versions" - "github.com/openziti/identity" - "github.com/openziti/metrics" - "github.com/openziti/transport/v2" "github.com/pkg/errors" "strings" "time" ) type Factory struct { - id *identity.TokenId ctrls env.NetworkControllers enabled bool routerConfig *router.Config @@ -47,6 +46,7 @@ type Factory struct { versionProvider versions.VersionProvider certChecker *CertExpirationChecker metricsRegistry metrics.Registry + env env.RouterEnv } func (factory *Factory) GetNetworkControllers() env.NetworkControllers { @@ -57,10 +57,6 @@ func (factory *Factory) Enabled() bool { return factory.enabled } -const ( - WsType = "ws" -) - func (factory *Factory) BindChannel(binding channel.Binding) error { binding.AddTypedReceiveHandler(handler_edge_ctrl.NewHelloHandler(factory.stateManager, factory.edgeRouterConfig.EdgeListeners)) @@ -70,14 +66,18 @@ func (factory *Factory) BindChannel(binding channel.Binding) error { binding.AddTypedReceiveHandler(handler_edge_ctrl.NewApiSessionRemovedHandler(factory.stateManager)) binding.AddTypedReceiveHandler(handler_edge_ctrl.NewApiSessionUpdatedHandler(factory.stateManager)) binding.AddTypedReceiveHandler(handler_edge_ctrl.NewSigningCertAddedHandler(factory.stateManager)) - binding.AddTypedReceiveHandler(handler_edge_ctrl.NewExtendEnrollmentCertsHandler(factory.routerConfig.Id, func() { + binding.AddTypedReceiveHandler(handler_edge_ctrl.NewExtendEnrollmentCertsHandler(factory.env.GetRouterId(), func() { factory.certChecker.CertsUpdated() })) + binding.AddReceiveHandlerF(int32(edge_ctrl_pb.ContentType_CreateTerminatorV2ResponseType), factory.hostedServices.HandleCreateTerminatorResponse) return nil } func (factory *Factory) NotifyOfReconnect(ch channel.Channel) { + pfxlog.Logger().Info("control channel reconnected, re-establishing hosted services") + factory.hostedServices.HandleReconnect() + go factory.stateManager.ValidateSessions(ch, factory.edgeRouterConfig.SessionValidateChunkSize, factory.edgeRouterConfig.SessionValidateMinInterval, factory.edgeRouterConfig.SessionValidateMaxInterval) } @@ -86,11 +86,8 @@ func (factory *Factory) GetTraceDecoders() []channel.TraceMessageDecoder { } func (factory *Factory) Run(env env.RouterEnv) error { - factory.ctrls = env.GetNetworkControllers() - factory.stateManager.StartHeartbeat(env, factory.edgeRouterConfig.HeartbeatIntervalSeconds, env.GetCloseNotify()) - - factory.certChecker = NewCertExpirationChecker(factory.routerConfig.Id, factory.edgeRouterConfig, env.GetNetworkControllers(), env.GetCloseNotify()) + factory.certChecker = NewCertExpirationChecker(factory.env.GetRouterId(), factory.edgeRouterConfig, env.GetNetworkControllers(), env.GetCloseNotify()) go func() { if err := factory.certChecker.Run(); err != nil { @@ -118,8 +115,6 @@ func (factory *Factory) LoadConfig(configMap map[interface{}]interface{}) error } config.Tcfg["protocol"] = append(config.Tcfg.Protocols(), "ziti-edge", "") - factory.id = config.RouterConfig.Id - factory.edgeRouterConfig = config go apiproxy.Start(config) @@ -127,13 +122,15 @@ func (factory *Factory) LoadConfig(configMap map[interface{}]interface{}) error } // NewFactory constructs a new Edge Xgress Factory instance -func NewFactory(routerConfig *router.Config, versionProvider versions.VersionProvider, stateManager fabric.StateManager, metricsRegistry metrics.Registry) *Factory { +func NewFactory(routerConfig *router.Config, env env.RouterEnv, stateManager fabric.StateManager) *Factory { factory := &Factory{ - hostedServices: NewHostedServicesRegistry(), + ctrls: env.GetNetworkControllers(), + hostedServices: newHostedServicesRegistry(env), stateManager: stateManager, - versionProvider: versionProvider, + versionProvider: env.GetVersionInfo(), routerConfig: routerConfig, - metricsRegistry: metricsRegistry, + metricsRegistry: env.GetMetricsRegistry(), + env: env, } return factory } @@ -162,7 +159,7 @@ func (factory *Factory) CreateListener(optionsData xgress.OptionsData) (xgress.L channel.HelloVersionHeader: versionHeader, } - return newListener(factory.id, factory, options, headers), nil + return newListener(factory.env.GetRouterId(), factory, options, headers), nil } // CreateDialer creates a new Edge Xgress dialer diff --git a/router/xgress_edge/hosted.go b/router/xgress_edge/hosted.go index b7a6f0161..cd2b40d26 100644 --- a/router/xgress_edge/hosted.go +++ b/router/xgress_edge/hosted.go @@ -17,29 +17,118 @@ package xgress_edge import ( + "fmt" + "github.com/cenkalti/backoff/v4" "github.com/michaelquigley/pfxlog" + "github.com/openziti/channel/v2" + "github.com/openziti/channel/v2/protobufs" + "github.com/openziti/sdk-golang/ziti/edge" + "github.com/openziti/ziti/common/pb/edge_ctrl_pb" + routerEnv "github.com/openziti/ziti/router/env" cmap "github.com/orcaman/concurrent-map/v2" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "google.golang.org/protobuf/proto" "sync" + "time" ) -func NewHostedServicesRegistry() *hostedServiceRegistry { - return &hostedServiceRegistry{ - services: sync.Map{}, - ids: cmap.New[string](), +func newHostedServicesRegistry(env routerEnv.RouterEnv) *hostedServiceRegistry { + result := &hostedServiceRegistry{ + services: sync.Map{}, + events: make(chan terminatorEvent), + env: env, + retriesPending: false, + waits: cmap.New[chan struct{}](), } + go result.run() + return result } type hostedServiceRegistry struct { - services sync.Map - ids cmap.ConcurrentMap[string, string] + services sync.Map + events chan terminatorEvent + env routerEnv.RouterEnv + retriesPending bool + waits cmap.ConcurrentMap[string, chan struct{}] +} + +type terminatorEvent interface { + handle(registry *hostedServiceRegistry) +} + +func (self *hostedServiceRegistry) run() { + retryTicker := time.NewTicker(50 * time.Millisecond) + defer retryTicker.Stop() + + for { + var retryChan <-chan time.Time + if self.retriesPending { + retryChan = retryTicker.C + } + + select { + case <-self.env.GetCloseNotify(): + return + case event := <-self.events: + event.handle(self) + case <-retryChan: + self.scanForRetries() + } + } +} + +type establishTerminatorEvent struct { + terminator *edgeTerminator +} + +func (self *establishTerminatorEvent) handle(registry *hostedServiceRegistry) { + registry.tryEstablish(self.terminator) +} + +func (self *hostedServiceRegistry) EstablishTerminator(terminator *edgeTerminator) { + event := &establishTerminatorEvent{ + terminator: terminator, + } + + self.Put(terminator.terminatorId.Load(), terminator) + + select { + case <-self.env.GetCloseNotify(): + pfxlog.Logger().WithField("terminatorId", terminator.terminatorId.Load()). + Error("unable to establish terminator, hosted service registry has been shutdown") + case self.events <- event: + } +} + +func (self *hostedServiceRegistry) scanForRetries() { + self.services.Range(func(key, value any) bool { + terminator := value.(*edgeTerminator) + if terminator.state.Load() == TerminatorStatePendingEstablishment { + self.tryEstablish(terminator) + } + return true + }) +} + +func (self *hostedServiceRegistry) tryEstablish(terminator *edgeTerminator) { + terminator.state.Store(TerminatorStateEstablishing) + err := self.env.GetRateLimiterPool().QueueOrError(func() { + self.establishTerminatorWithRetry(terminator) + }) + if err != nil { + terminator.state.Store(TerminatorStatePendingEstablishment) + pfxlog.Logger().WithField("terminatorId", terminator.Id()).Info("rate limited: unable to queue to establish") + self.retriesPending = true + } } -func (registry *hostedServiceRegistry) Put(hostId string, conn *edgeTerminator) { - registry.services.Store(hostId, conn) +func (self *hostedServiceRegistry) Put(hostId string, conn *edgeTerminator) { + self.services.Store(hostId, conn) } -func (registry *hostedServiceRegistry) Get(hostId string) (*edgeTerminator, bool) { - val, ok := registry.services.Load(hostId) +func (self *hostedServiceRegistry) Get(hostId string) (*edgeTerminator, bool) { + val, ok := self.services.Load(hostId) if !ok { return nil, false } @@ -47,27 +136,40 @@ func (registry *hostedServiceRegistry) Get(hostId string) (*edgeTerminator, bool return ch, ok } -func (registry *hostedServiceRegistry) Delete(hostId string) { - registry.services.Delete(hostId) +func (self *hostedServiceRegistry) GetTerminatorForListener(listenerId string) *edgeTerminator { + var result *edgeTerminator + self.services.Range(func(key, value interface{}) bool { + terminator := value.(*edgeTerminator) + if terminator.listenerId == listenerId { + result = terminator + return false + } + return true + }) + return result } -func (registry *hostedServiceRegistry) cleanupServices(proxy *edgeClientConn) { - registry.services.Range(func(key, value interface{}) bool { +func (self *hostedServiceRegistry) Delete(hostId string) { + self.services.Delete(hostId) +} + +func (self *hostedServiceRegistry) cleanupServices(proxy *edgeClientConn) { + self.services.Range(func(key, value interface{}) bool { terminator := value.(*edgeTerminator) if terminator.edgeClientConn == proxy { terminator.close(false, "") // don't notify, channel is already closed, we can't send messages - registry.services.Delete(key) + self.services.Delete(key) } return true }) } -func (registry *hostedServiceRegistry) cleanupDuplicates(newest *edgeTerminator) { - registry.services.Range(func(key, value interface{}) bool { +func (self *hostedServiceRegistry) cleanupDuplicates(newest *edgeTerminator) { + self.services.Range(func(key, value interface{}) bool { terminator := value.(*edgeTerminator) if terminator != newest && newest.token == terminator.token && newest.instance == terminator.instance { terminator.close(false, "duplicate terminator") // don't notify, channel is already closed, we can't send messages - registry.services.Delete(key) + self.services.Delete(key) pfxlog.Logger().WithField("routerId", terminator.edgeClientConn.listener.id.Token). WithField("sessionToken", terminator.token). WithField("instance", terminator.instance). @@ -79,13 +181,13 @@ func (registry *hostedServiceRegistry) cleanupDuplicates(newest *edgeTerminator) }) } -func (registry *hostedServiceRegistry) unbindSession(sessionToken string, proxy *edgeClientConn) bool { +func (self *hostedServiceRegistry) unbindSession(connId uint32, sessionToken string, proxy *edgeClientConn) bool { atLeastOneRemoved := false - registry.services.Range(func(key, value interface{}) bool { + self.services.Range(func(key, value interface{}) bool { terminator := value.(*edgeTerminator) - if terminator.token == sessionToken && terminator.edgeClientConn == proxy { - terminator.close(true, "unbind successful") // don't notify, sdk asked us to unbind - registry.services.Delete(key) + if terminator.MsgChannel.Id() == connId && terminator.token == sessionToken && terminator.edgeClientConn == proxy { + terminator.close(false, "unbind successful") // don't notify, sdk asked us to unbind + self.services.Delete(key) pfxlog.Logger().WithField("routerId", terminator.edgeClientConn.listener.id.Token). WithField("sessionToken", sessionToken). WithField("terminatorId", terminator.terminatorId.Load()). @@ -97,9 +199,9 @@ func (registry *hostedServiceRegistry) unbindSession(sessionToken string, proxy return atLeastOneRemoved } -func (registry *hostedServiceRegistry) getRelatedTerminators(sessionToken string, proxy *edgeClientConn) []*edgeTerminator { +func (self *hostedServiceRegistry) getRelatedTerminators(sessionToken string, proxy *edgeClientConn) []*edgeTerminator { var result []*edgeTerminator - registry.services.Range(func(key, value interface{}) bool { + self.services.Range(func(key, value interface{}) bool { terminator := value.(*edgeTerminator) if terminator.token == sessionToken && terminator.edgeClientConn == proxy { result = append(result, terminator) @@ -108,3 +210,153 @@ func (registry *hostedServiceRegistry) getRelatedTerminators(sessionToken string }) return result } + +func (self *hostedServiceRegistry) establishTerminatorWithRetry(terminator *edgeTerminator) { + log := logrus.WithField("terminatorId", terminator.terminatorId.Load()) + + if state := terminator.state.Load(); state != TerminatorStateEstablishing { + log.WithField("state", state.String()).Info("not attempting to establish terminator, not in establishing state") + return + } + + operation := func() error { + if terminator.edgeClientConn.ch.IsClosed() { + return backoff.Permanent(fmt.Errorf("edge link is closed, stopping terminator creation for terminator %s", + terminator.terminatorId.Load())) + } + if state := terminator.state.Load(); state != TerminatorStateEstablishing { + return backoff.Permanent(fmt.Errorf("terminator state is %v, stopping terminator creation for terminator %s", + state.String(), terminator.terminatorId.Load())) + } + + var err error + log.Info("attempting to establish terminator") + err = self.establishTerminator(terminator) + if err != nil && terminator.state.Load() != TerminatorStateEstablishing { + return backoff.Permanent(err) + } + return err + } + + expBackoff := backoff.NewExponentialBackOff() + expBackoff.InitialInterval = 5 * time.Second + expBackoff.MaxInterval = 5 * time.Minute + + if err := backoff.Retry(operation, expBackoff); err != nil { + log.WithError(err).Error("stopping attempts to establish terminator, see error") + } else if terminator.postValidate { + if result, err := terminator.inspect(true); err != nil { + log.WithError(err).Error("error validating terminator after create") + } else if result.Type != edge.ConnTypeBind { + log.WithError(err).Error("terminator invalid in sdk after create, closed") + } else { + log.Info("terminator validated successfully") + } + } +} + +func (self *hostedServiceRegistry) establishTerminator(terminator *edgeTerminator) error { + factory := terminator.edgeClientConn.listener.factory + + log := pfxlog.Logger(). + WithField("routerId", factory.env.GetRouterId().Token). + WithField("terminatorId", terminator.terminatorId.Load()) + + request := &edge_ctrl_pb.CreateTerminatorV2Request{ + Address: terminator.terminatorId.Load(), + SessionToken: terminator.token, + Fingerprints: terminator.edgeClientConn.fingerprints.Prints(), + PeerData: terminator.hostData, + Cost: uint32(terminator.cost), + Precedence: terminator.precedence, + InstanceId: terminator.instance, + InstanceSecret: terminator.instanceSecret, + } + + timeout := factory.ctrls.DefaultRequestTimeout() + ctrlCh := factory.ctrls.AnyCtrlChannel() + if ctrlCh == nil { + errStr := "no controller available, cannot create terminator" + log.Error(errStr) + return errors.New(errStr) + } + + err := protobufs.MarshalTyped(request).WithTimeout(timeout).SendAndWaitForWire(ctrlCh) + if err != nil { + return err + } + + if self.waitForTerminatorCreated(terminator.terminatorId.Load(), 10*time.Second) { + return nil + } + + // return an error to indicate that we need to check if a response has come back after the next interval, + // and if not, re-send + return errors.Errorf("timeout waiting for response to create terminator request for terminator %v", terminator.terminatorId.Load()) +} + +func (self *hostedServiceRegistry) HandleCreateTerminatorResponse(msg *channel.Message, ctrlCh channel.Channel) { + log := pfxlog.Logger().WithField("routerId", self.env.GetRouterId().Token) + + response := &edge_ctrl_pb.CreateTerminatorV2Response{} + + if err := proto.Unmarshal(msg.Body, response); err != nil { + log.WithError(err).Error("error unmarshalling create terminator v2 response") + return + } + + log = log.WithField("terminatorId", response.TerminatorId) + + terminator, found := self.Get(response.TerminatorId) + if !found { + log.Error("no terminator found for id") + return + } + + if terminator.state.CompareAndSwap(TerminatorStateEstablishing, TerminatorStateEstablished) { + self.notifyTerminatorCreated(response.TerminatorId) + log.Info("received terminator created notification") + } else { + log.Info("received additional terminator created notification") + } +} + +func (self *hostedServiceRegistry) waitForTerminatorCreated(id string, timeout time.Duration) bool { + notifyC := make(chan struct{}) + defer self.waits.Remove(id) + + self.waits.Set(id, notifyC) + select { + case <-notifyC: + return true + case <-time.After(timeout): + return false + } +} + +func (self *hostedServiceRegistry) notifyTerminatorCreated(id string) { + notifyC, _ := self.waits.Get(id) + if notifyC != nil { + close(notifyC) + } +} + +func (self *hostedServiceRegistry) HandleReconnect() { + var restablishList []*edgeTerminator + self.services.Range(func(key, value interface{}) bool { + terminator := value.(*edgeTerminator) + if terminator.state.CompareAndSwap(TerminatorStateEstablished, TerminatorStatePendingEstablishment) { + restablishList = append(restablishList, terminator) + } + return true + }) + + // wait for verify terminator events to come in + time.Sleep(10 * time.Second) + + for _, terminator := range restablishList { + if terminator.state.Load() == TerminatorStatePendingEstablishment { + self.EstablishTerminator(terminator) + } + } +} diff --git a/router/xgress_edge/listener.go b/router/xgress_edge/listener.go index fde76c182..7236a5457 100644 --- a/router/xgress_edge/listener.go +++ b/router/xgress_edge/listener.go @@ -208,7 +208,7 @@ func (self *edgeClientConn) processBind(req *channel.Message, ch channel.Channel } if supportsCreateTerminatorV2 { - self.processBindV2(req, ch, ctrlCh) + self.processBindV2(req, ch) } else { self.processBindV1(req, ch, ctrlCh) } @@ -312,7 +312,7 @@ func (self *edgeClientConn) processBindV1(req *channel.Message, ch channel.Chann log.Info("created terminator") } -func (self *edgeClientConn) processBindV2(req *channel.Message, ch channel.Channel, ctrlCh channel.Channel) { +func (self *edgeClientConn) processBindV2(req *channel.Message, ch channel.Channel) { token := string(req.Body) log := pfxlog.ContextLogger(ch.Label()). @@ -326,33 +326,41 @@ func (self *edgeClientConn) processBindV2(req *channel.Message, ch channel.Chann return } - terminatorInstance, _ := req.GetStringHeader(edge.TerminatorIdentityHeader) + var terminatorId string - assignIds, _ := req.GetBoolHeader(edge.RouterProvidedConnId) - log.Debugf("client requested router provided connection ids: %v", assignIds) + listenerId, _ := req.GetStringHeader(edge.ListenerId) + if listenerId != "" { + log = log.WithField("listenerId", listenerId) + if terminator := self.listener.factory.hostedServices.GetTerminatorForListener(listenerId); terminator != nil { + terminatorId = terminator.terminatorId.Load() + log = log.WithField("terminatorId", terminatorId) - terminatorId := idgen.NewUUIDString() + // everything is the same, we can re-use the terminator + if terminator.edgeClientConn == self && terminator.token == token { + log.Info("duplicate create terminator request") + self.sendStateConnectedReply(req, nil) + return + } - terminator := &edgeTerminator{ - MsgChannel: *edge.NewEdgeMsgChannel(self.ch, connId), - edgeClientConn: self, - token: token, - instance: terminatorInstance, - assignIds: assignIds, - v2: true, + if terminator.terminatorId.CompareAndSwap(terminatorId, "") { + log.Info("replacing existing terminator") + self.listener.factory.hostedServices.Delete(terminatorId) + } else { + terminatorId = idgen.NewUUIDString() + log.Infof("unable to replace existing terminator, as it's being shut down, creating new one with id %s", terminatorId) + } + } } - log = log.WithField("bindConnId", terminator.MsgChannel.Id()) - terminator.terminatorId.Store(terminatorId) + if terminatorId == "" { + terminatorId = idgen.NewUUIDString() + } - log = log.WithField("terminatorId", terminatorId) - log.Debug("binding service") + log = log.WithField("bindConnId", connId).WithField("terminatorId", terminatorId) + terminatorInstance, _ := req.GetStringHeader(edge.TerminatorIdentityHeader) - hostData := make(map[uint32][]byte) - pubKey, hasKey := req.Headers[edge.PublicKeyHeader] - if hasKey { - hostData[edge.PublicKeyHeader] = pubKey - } + assignIds, _ := req.GetBoolHeader(edge.RouterProvidedConnId) + log.Debugf("client requested router provided connection ids: %v", assignIds) cost := uint16(0) if costBytes, hasCost := req.Headers[edge.CostHeader]; hasCost { @@ -369,67 +377,62 @@ func (self *edgeClientConn) processBindV2(req *channel.Message, ch channel.Chann } } - log.Debug("establishing listener") - - // need to remove session remove listener on close - terminator.onClose = self.listener.factory.stateManager.AddEdgeSessionRemovedListener(token, func(token string) { - terminator.close(true, "session ended") - }) - - self.listener.factory.hostedServices.Put(terminatorId, terminator) - var terminatorInstanceSecret []byte if terminatorInstance != "" { terminatorInstanceSecret = req.Headers[edge.TerminatorIdentitySecretHeader] } - request := &edge_ctrl_pb.CreateTerminatorV2Request{ - Address: terminatorId, - SessionToken: token, - Fingerprints: self.fingerprints.Prints(), - PeerData: hostData, - Cost: uint32(cost), - Precedence: precedence, - InstanceId: terminatorInstance, - InstanceSecret: terminatorInstanceSecret, + hostData := make(map[uint32][]byte) + if pubKey, hasKey := req.Headers[edge.PublicKeyHeader]; hasKey { + hostData[edge.PublicKeyHeader] = pubKey } - timeout := self.listener.factory.ctrls.DefaultRequestTimeout() - responseMsg, err := protobufs.MarshalTyped(request).WithTimeout(timeout).SendForReply(ctrlCh) - resp := &edge_ctrl_pb.CreateTerminatorV2Response{} - err = protobufs.TypedResponse(resp).Unmarshall(responseMsg, err) - if err == nil && resp.Result != edge_ctrl_pb.CreateTerminatorResult_Success { - err = errors.Errorf("terminator create failed: %s", resp.Msg) + postValidate := false + if supportsInspect, _ := req.GetBoolHeader(edge.SupportsInspectHeader); supportsInspect { + postValidate = true } - if err != nil { - log.WithError(err).Warn("error creating terminator") - terminator.close(false, "") // don't notify here, as we're notifying next line with a response - self.sendStateClosedReply(err.Error(), req) - return + terminator := &edgeTerminator{ + MsgChannel: *edge.NewEdgeMsgChannel(self.ch, connId), + edgeClientConn: self, + token: token, + cost: cost, + precedence: precedence, + instance: terminatorInstance, + instanceSecret: terminatorInstanceSecret, + hostData: hostData, + assignIds: assignIds, + v2: true, + postValidate: postValidate, } + terminator.terminatorId.Store(terminatorId) - if terminator.MsgChannel.IsClosed() { - log.Warn("edge channel closed while setting up terminator. cleaning up terminator now") - terminator.close(false, "edge channel closed") - return - } + log.Info("establishing terminator") - log.Debug("registered listener for terminator") - log.Debug("returning connection state CONNECTED to client") - self.sendStateConnectedReply(req, nil) + // need to remove session remove listener on close + terminator.onClose = self.listener.factory.stateManager.AddEdgeSessionRemovedListener(token, func(token string) { + terminator.close(true, "session ended") + }) - self.listener.factory.hostedServices.cleanupDuplicates(terminator) + self.sendStateConnectedReply(req, nil) - log.Info("created terminator") + self.listener.factory.hostedServices.EstablishTerminator(terminator) + if listenerId == "" { + // only removed dupes with a scan if we don't have an sdk provided key + self.listener.factory.hostedServices.cleanupDuplicates(terminator) + } } func (self *edgeClientConn) processUnbind(req *channel.Message, _ channel.Channel) { + connId, _ := req.GetUint32Header(edge.ConnIdHeader) token := string(req.Body) - atLeastOneTerminatorRemoved := self.listener.factory.hostedServices.unbindSession(token, self) + atLeastOneTerminatorRemoved := self.listener.factory.hostedServices.unbindSession(connId, token, self) if !atLeastOneTerminatorRemoved { - self.sendStateClosedReply(fmt.Sprintf("no terminator found for token '%s'", token), req) + pfxlog.Logger(). + WithField("connId", connId). + WithField("sessionToken", token). + Info("no terminator found to unbind for token") } } diff --git a/router/xgress_edge_tunnel/tunneler.go b/router/xgress_edge_tunnel/tunneler.go index fa37ed01f..cf1161141 100644 --- a/router/xgress_edge_tunnel/tunneler.go +++ b/router/xgress_edge_tunnel/tunneler.go @@ -176,6 +176,8 @@ func (self *tunneler) ReestablishTerminators() { log := pfxlog.Logger() terminators := self.terminators.Items() + time.Sleep(10 * time.Second) // wait for validate terminator messages to come in first + if len(terminators) > 0 { pfxlog.Logger().Debugf("reestablishing %v terminators", len(terminators)) } diff --git a/tests/addressable_terminators_test.go b/tests/addressable_terminators_test.go index c524ee0f3..7adf848ff 100644 --- a/tests/addressable_terminators_test.go +++ b/tests/addressable_terminators_test.go @@ -39,6 +39,9 @@ func Test_AddressableTerminators(t *testing.T) { ctx.CreateEnrollAndStartEdgeRouter() + watcher := ctx.AdminManagementSession.newTerminatorWatcher() + defer watcher.Close() + type host struct { id *identity context ziti.Context @@ -59,7 +62,7 @@ func Test_AddressableTerminators(t *testing.T) { BindUsingEdgeIdentity: true, }) ctx.Req.NoError(err) - ctx.requireNListener(1, host.listener, 5*time.Second) + watcher.waitForTerminators(service.Id, 1, 5*time.Second) } type client struct { diff --git a/tests/authenticate.go b/tests/authenticate.go index 6f08b655a..3ca38fb34 100644 --- a/tests/authenticate.go +++ b/tests/authenticate.go @@ -28,18 +28,22 @@ import ( "fmt" "github.com/Jeffail/gabs" "github.com/michaelquigley/pfxlog" + "github.com/openziti/channel/v2" "github.com/openziti/edge-api/rest_model" + "github.com/openziti/foundation/v2/stringz" + "github.com/openziti/sdk-golang/ziti" "github.com/openziti/ziti/common/cert" "github.com/openziti/ziti/common/eid" + "github.com/openziti/ziti/common/pb/mgmt_pb" "github.com/openziti/ziti/controller/env" - "github.com/openziti/foundation/v2/stringz" - "github.com/openziti/sdk-golang/ziti" + "github.com/openziti/ziti/controller/event" "github.com/pkg/errors" "gopkg.in/resty.v1" "math/big" "net/http" "net/url" "sort" + "sync" "time" ) @@ -1064,6 +1068,140 @@ func (request *authenticatedRequests) getIdentityJwt(identityId string) string { return data.Data().(string) } +func (request *authenticatedRequests) streamEvents(req *subscriptionRequest) (func(), error) { + streamEventsRequest := map[string]interface{}{} + streamEventsRequest["format"] = "json" + streamEventsRequest["subscriptions"] = req.Subscriptions + + bindHandler := func(binding channel.Binding) error { + binding.AddReceiveHandlerF(int32(mgmt_pb.ContentType_StreamEventsEventType), req.Callback) + return nil + } + + ch, err := request.testContext.NewWsMgmtChannel(channel.BindHandlerF(bindHandler)) + if err != nil { + return nil, err + } + + closeF := func() { + if err := ch.Close(); err != nil { + pfxlog.Logger().WithError(err).Error("failure closing event channel") + } + } + + msgBytes, err := json.Marshal(streamEventsRequest) + if err != nil { + closeF() + return nil, err + } + + if req.Timeout == 0 { + req.Timeout = time.Second + } + + requestMsg := channel.NewMessage(int32(mgmt_pb.ContentType_StreamEventsRequestType), msgBytes) + responseMsg, err := requestMsg.WithTimeout(req.Timeout).SendForReply(ch) + if err != nil { + closeF() + return nil, err + } + + if responseMsg.ContentType != channel.ContentTypeResultType { + closeF() + return nil, errors.Errorf("unexpected response type %v", responseMsg.ContentType) + } + + result := channel.UnmarshalResult(responseMsg) + if !result.Success { + closeF() + return nil, fmt.Errorf("error starting event streaming [%s]\n", result.Message) + } + + return closeF, nil +} + +func (request *authenticatedRequests) newTerminatorWatcher() *terminatorWatcher { + watcher := &terminatorWatcher{ + testContext: request.testContext, + counts: map[string]int{}, + notifyAll: make(chan struct{}, 1), + } + + req := &subscriptionRequest{ + Subscriptions: []*event.Subscription{ + {Type: event.TerminatorEventsNs}, + }, + Callback: watcher.HandleMessage, + } + + closer, err := request.streamEvents(req) + request.testContext.NoError(err) + + watcher.closer = closer + return watcher +} + +type subscriptionRequest struct { + Timeout time.Duration + Subscriptions []*event.Subscription + Callback func(msg *channel.Message, ch channel.Channel) +} + +type terminatorWatcher struct { + testContext *TestContext + lock sync.Mutex + counts map[string]int + notifyAll chan struct{} + closer func() +} + +func (self *terminatorWatcher) Close() { + self.closer() +} + +func (self *terminatorWatcher) HandleMessage(msg *channel.Message, _ channel.Channel) { + eventType, _ := msg.GetStringHeader(int32(mgmt_pb.Header_EventTypeHeader)) + if eventType != "terminator" { + return + } + evt := &event.TerminatorEvent{} + if err := json.Unmarshal(msg.Body, &evt); err != nil { + pfxlog.Logger().WithError(err).Error("unable to unmarshal terminator event") + } + + self.lock.Lock() + self.counts[evt.ServiceId] = evt.TotalTerminators + self.lock.Unlock() + + for { + select { + case self.notifyAll <- struct{}{}: + default: + return + } + } +} + +func (self *terminatorWatcher) waitForTerminators(service string, count int, timeout time.Duration) { + start := time.Now() + for { + self.lock.Lock() + current := self.counts[service] + self.lock.Unlock() + + if current >= count { + return + } + + self.testContext.False(time.Since(start) > timeout, "timed out waiting for terminator creation") + + select { + case <-self.notifyAll: + case <-time.After(100 * time.Millisecond): + } + } +} + func newSelfSignedCert(commonName string) (*x509.Certificate, crypto.PrivateKey) { priv, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) if err != nil { diff --git a/tests/context.go b/tests/context.go index 08ff74df6..11394d7ce 100644 --- a/tests/context.go +++ b/tests/context.go @@ -28,22 +28,26 @@ import ( "fmt" "github.com/go-openapi/strfmt" "github.com/google/uuid" + "github.com/gorilla/websocket" + "github.com/openziti/channel/v2" + "github.com/openziti/channel/v2/websockets" "github.com/openziti/edge-api/rest_model" - "github.com/openziti/ziti/common" - "github.com/openziti/ziti/common/eid" - "github.com/openziti/ziti/router/enroll" - "github.com/openziti/ziti/router/fabric" - "github.com/openziti/ziti/router/xgress_edge" - "github.com/openziti/ziti/router/xgress_edge_tunnel" - "github.com/openziti/ziti/controller/xt_smartrouting" - "github.com/openziti/ziti/router" - "github.com/openziti/ziti/router/xgress" nfPem "github.com/openziti/foundation/v2/pem" "github.com/openziti/foundation/v2/versions" "github.com/openziti/identity/certtools" "github.com/openziti/sdk-golang/ziti" "github.com/openziti/sdk-golang/ziti/edge" sdkEnroll "github.com/openziti/sdk-golang/ziti/enroll" + "github.com/openziti/ziti/common" + "github.com/openziti/ziti/common/eid" + "github.com/openziti/ziti/controller/env" + "github.com/openziti/ziti/controller/xt_smartrouting" + "github.com/openziti/ziti/router" + "github.com/openziti/ziti/router/enroll" + "github.com/openziti/ziti/router/fabric" + "github.com/openziti/ziti/router/xgress" + "github.com/openziti/ziti/router/xgress_edge" + "github.com/openziti/ziti/router/xgress_edge_tunnel" "github.com/pkg/errors" "io" "net" @@ -62,12 +66,12 @@ import ( "github.com/Jeffail/gabs" "github.com/michaelquigley/pfxlog" - "github.com/openziti/ziti/controller/server" - "github.com/openziti/ziti/controller" idlib "github.com/openziti/identity" "github.com/openziti/transport/v2" "github.com/openziti/transport/v2/tcp" "github.com/openziti/transport/v2/tls" + "github.com/openziti/ziti/controller" + "github.com/openziti/ziti/controller/server" "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" ) @@ -283,6 +287,42 @@ func (ctx *TestContext) NewClientComponents(apiPath string) (*resty.Client, *htt return client, httpClient, clientTransport } +func (ctx *TestContext) NewWsMgmtChannel(bindHandler channel.BindHandler) (channel.Channel, error) { + log := pfxlog.Logger() + + wsUrl := "wss://" + ctx.ApiHost + "/fabric/v1/ws-api" + + dialer := &websocket.Dialer{ + Proxy: http.ProxyFromEnvironment, + TLSClientConfig: ctx.DefaultClientApiClient().GetClient().Transport.(*http.Transport).TLSClientConfig, + HandshakeTimeout: 5 * time.Second, + } + + authHeader := http.Header{} + authHeader.Set(env.ZitiSession, *ctx.AdminManagementSession.AuthResponse.Token) + + conn, resp, err := dialer.Dial(wsUrl, authHeader) + if err != nil { + if resp != nil { + if body, rerr := io.ReadAll(resp.Body); rerr == nil { + log.WithError(err).Errorf("response body [%v]", string(body)) + } + } else { + log.WithError(err).Error("no response from websocket dial") + } + return nil, err + } + + id := &idlib.TokenId{Token: "mgmt"} + underlayFactory := websockets.NewUnderlayFactory(id, conn, nil) + + ch, err := channel.NewChannel("mgmt", underlayFactory, bindHandler, nil) + if err != nil { + return nil, err + } + return ch, nil +} + func (ctx *TestContext) NewClientComponentsWithClientCert(cert *x509.Certificate, privateKey crypto.PrivateKey) (*resty.Client, *http.Client, *http.Transport) { clientTransport := ctx.NewTransportWithClientCert(cert, privateKey) httpClient := ctx.NewHttpClient(clientTransport) @@ -457,7 +497,7 @@ func (ctx *TestContext) startEdgeRouter() { ctx.router = router.Create(config, NewVersionProviderTest()) stateManager := fabric.NewStateManager() - xgressEdgeFactory := xgress_edge.NewFactory(config, NewVersionProviderTest(), stateManager, ctx.router.GetMetricsRegistry()) + xgressEdgeFactory := xgress_edge.NewFactory(config, ctx.router, stateManager) xgress.GlobalRegistry().Register(common.EdgeBinding, xgressEdgeFactory) xgressEdgeTunnelFactory := xgress_edge_tunnel.NewFactory(ctx.router, config, stateManager) @@ -818,32 +858,6 @@ func (ctx *TestContext) requireEntityEnrolled(name string, entity *gabs.Containe ctx.Req.Nil(expiresAt, "expected "+name+" with isVerified=true to have an nil enrollment expires at date") } -func (ctx *TestContext) requireNListener(count int, l edge.Listener, timeout time.Duration) { - sl, ok := l.(edge.SessionListener) - ctx.Req.True(ok, "must be session listener") - - c := make(chan []edge.Listener, 5) - sl.SetConnectionChangeHandler(func(conn []edge.Listener) { - select { - case c <- conn: - default: - } - }) - - t := time.After(timeout) - - for { - select { - case state := <-c: - if len(state) >= count { - return - } - case <-t: - ctx.Req.Failf("timeout", "listener did not have %v connections within %v", count, timeout) - } - } -} - func (ctx *TestContext) WrapNetConn(conn edge.Conn, err error) *TestConn { ctx.Req.NoError(err) return &TestConn{ diff --git a/tests/data_flow_hs_test.go b/tests/data_flow_hs_test.go index 83d43ff5a..8809e7052 100644 --- a/tests/data_flow_hs_test.go +++ b/tests/data_flow_hs_test.go @@ -38,21 +38,24 @@ func Test_HSDataflow(t *testing.T) { ctx.CreateEnrollAndStartEdgeRouter() + watcher := ctx.AdminManagementSession.newTerminatorWatcher() + defer watcher.Close() + _, hostContext1 := ctx.AdminManagementSession.RequireCreateSdkContext() defer hostContext1.Close() listener1, err := hostContext1.Listen(service.Name) ctx.Req.NoError(err) - ctx.requireNListener(1, listener1, 2*time.Second) _, hostContext2 := ctx.AdminManagementSession.RequireCreateSdkContext() defer hostContext2.Close() listener2, err := hostContext2.Listen(service.Name) ctx.Req.NoError(err) - ctx.requireNListener(1, listener2, 2*time.Second) defer listener2.Close() + watcher.waitForTerminators(service.Id, 2, 2*time.Second) + serverHandler := func(conn *testServerConn) error { for { name, eof := conn.ReadString(1024, time.Minute) diff --git a/tests/terminator_update_test.go b/tests/terminator_update_test.go index 58d7cc1d2..a1f26a941 100644 --- a/tests/terminator_update_test.go +++ b/tests/terminator_update_test.go @@ -37,9 +37,12 @@ func Test_UpdateTerminators(t *testing.T) { _, context := ctx.AdminManagementSession.RequireCreateSdkContext() defer context.Close() + watcher := ctx.AdminManagementSession.newTerminatorWatcher() + defer watcher.Close() + listener, err := context.Listen(service.Name) ctx.Req.NoError(err) - ctx.requireNListener(1, listener, time.Second) + watcher.waitForTerminators(service.Id, 1, 2*time.Second) defer func() { _ = listener.Close() }() terminators := ctx.AdminManagementSession.listTerminators(`binding="edge"`) diff --git a/ziti/cmd/fabric/root.go b/ziti/cmd/fabric/root.go index 447d61b0e..51da34c6f 100644 --- a/ziti/cmd/fabric/root.go +++ b/ziti/cmd/fabric/root.go @@ -37,6 +37,7 @@ func NewFabricCmd(p common.OptionsProvider) *cobra.Command { fabricCmd.AddCommand(newDbCmd(p)) fabricCmd.AddCommand(newStreamCommand(p)) fabricCmd.AddCommand(newRaftCmd(p)) + fabricCmd.AddCommand(newValidateCommand(p)) return fabricCmd } @@ -99,6 +100,19 @@ func newStreamCommand(p common.OptionsProvider) *cobra.Command { return streamCmd } +func newValidateCommand(p common.OptionsProvider) *cobra.Command { + validateCmd := &cobra.Command{ + Use: "validate", + Short: "validate model data", + Run: func(cmd *cobra.Command, args []string) { + cmdhelper.CheckErr(cmd.Help()) + }, + } + + validateCmd.AddCommand(NewValidateTerminatorsCmd(p)) + return validateCmd +} + // createEntityOfType create an entity of the given type on the Ziti Controller func createEntityOfType(entityType string, body string, options *api.Options) (*gabs.Container, error) { return util.ControllerCreate("fabric", entityType, body, options.Out, options.OutputJSONRequest, options.OutputJSONResponse, options.Timeout, options.Verbose) diff --git a/ziti/cmd/fabric/validate_terminators.go b/ziti/cmd/fabric/validate_terminators.go new file mode 100644 index 000000000..a40b1677d --- /dev/null +++ b/ziti/cmd/fabric/validate_terminators.go @@ -0,0 +1,124 @@ +/* + 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 fabric + +import ( + "fmt" + "github.com/michaelquigley/pfxlog" + "github.com/openziti/channel/v2" + "github.com/openziti/channel/v2/protobufs" + "github.com/openziti/ziti/common/pb/mgmt_pb" + "github.com/openziti/ziti/ziti/cmd/api" + "github.com/openziti/ziti/ziti/cmd/common" + "github.com/spf13/cobra" + "google.golang.org/protobuf/proto" + "time" +) + +type validateTerminatorsAction struct { + api.Options + filter string + fixInvalid bool + showOnlyInvalid bool + + eventNotify chan *mgmt_pb.TerminatorDetail +} + +func NewValidateTerminatorsCmd(p common.OptionsProvider) *cobra.Command { + action := validateTerminatorsAction{ + Options: api.Options{ + CommonOptions: p(), + }, + } + + validateTerminatorsCmd := &cobra.Command{ + Use: "terminators", + Short: "Validate terminators", + Example: "ziti fabric validate terminators --circuits --metrics --metrics-filter '.*'", + Args: cobra.ExactArgs(0), + RunE: action.validateTerminators, + } + + action.AddCommonFlags(validateTerminatorsCmd) + validateTerminatorsCmd.Flags().BoolVar(&action.fixInvalid, "fix-invalid", false, "Fix invalid terminators. Usually this means deleting them.") + validateTerminatorsCmd.Flags().BoolVar(&action.showOnlyInvalid, "show-only-invalid", false, "Hide results for valid terminators") + validateTerminatorsCmd.Flags().StringVar(&action.filter, "filter", "", "Specify which terminators to validate") + return validateTerminatorsCmd +} + +func (self *validateTerminatorsAction) validateTerminators(cmd *cobra.Command, _ []string) error { + closeNotify := make(chan struct{}) + self.eventNotify = make(chan *mgmt_pb.TerminatorDetail, 1) + + bindHandler := func(binding channel.Binding) error { + binding.AddReceiveHandler(int32(mgmt_pb.ContentType_ValidateTerminatorResultType), self) + binding.AddCloseHandler(channel.CloseHandlerF(func(ch channel.Channel) { + close(closeNotify) + })) + return nil + } + + ch, err := api.NewWsMgmtChannel(channel.BindHandlerF(bindHandler)) + if err != nil { + return err + } + + request := &mgmt_pb.ValidateTerminatorsRequest{ + Filter: self.filter, + FixInvalid: self.fixInvalid, + } + + responseMsg, err := protobufs.MarshalTyped(request).WithTimeout(time.Duration(self.Timeout) * time.Second).SendForReply(ch) + + response := &mgmt_pb.ValidateTerminatorsResponse{} + if err = protobufs.TypedResponse(response).Unmarshall(responseMsg, err); err != nil { + return err + } + + if !response.Success { + return fmt.Errorf("failed to start terminator validation: %s", response.Message) + } + + fmt.Printf("started validation of %v terminators\n", response.TerminatorCount) + + expected := response.TerminatorCount + + for expected > 0 { + select { + case <-closeNotify: + fmt.Printf("channel closed, exiting") + return nil + case detail := <-self.eventNotify: + if !self.showOnlyInvalid || detail.State != mgmt_pb.TerminatorState_Valid { + fmt.Printf("id: %s, binding: %s, hostId: %s, routerId: %s, state: %s, fixed: %v, detail: %s\n", + detail.TerminatorId, detail.Binding, detail.HostId, detail.RouterId, detail.State.String(), detail.Fixed, detail.Detail) + } + expected-- + } + } + return nil +} + +func (self *validateTerminatorsAction) HandleReceive(msg *channel.Message, _ channel.Channel) { + detail := &mgmt_pb.TerminatorDetail{} + if err := proto.Unmarshal(msg.Body, detail); err != nil { + pfxlog.Logger().WithError(err).Error("unable to unmarshal terminator detail") + return + } + + self.eventNotify <- detail +} diff --git a/ziti/router/run.go b/ziti/router/run.go index 638413f47..4edbc1b87 100644 --- a/ziti/router/run.go +++ b/ziti/router/run.go @@ -20,16 +20,16 @@ import ( "fmt" "github.com/michaelquigley/pfxlog" "github.com/openziti/agent" + "github.com/openziti/foundation/v2/debugz" "github.com/openziti/ziti/common" + "github.com/openziti/ziti/common/version" + "github.com/openziti/ziti/router" "github.com/openziti/ziti/router/debugops" "github.com/openziti/ziti/router/fabric" + "github.com/openziti/ziti/router/xgress" "github.com/openziti/ziti/router/xgress_edge" "github.com/openziti/ziti/router/xgress_edge_transport" "github.com/openziti/ziti/router/xgress_edge_tunnel" - "github.com/openziti/ziti/router" - "github.com/openziti/ziti/router/xgress" - "github.com/openziti/foundation/v2/debugz" - "github.com/openziti/ziti/common/version" "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/spf13/pflag" @@ -75,7 +75,7 @@ func run(cmd *cobra.Command, args []string) { stateManager := fabric.NewStateManager() - xgressEdgeFactory := xgress_edge.NewFactory(config, version.GetCmdBuildInfo(), stateManager, r.GetMetricsRegistry()) + xgressEdgeFactory := xgress_edge.NewFactory(config, r, stateManager) xgress.GlobalRegistry().Register(common.EdgeBinding, xgressEdgeFactory) if err := r.RegisterXrctrl(xgressEdgeFactory); err != nil { logrus.WithError(err).Panic("error registering edge in framework") diff --git a/zititest/go.mod b/zititest/go.mod index b16ad44e8..2b334a1af 100644 --- a/zititest/go.mod +++ b/zititest/go.mod @@ -11,21 +11,21 @@ require ( github.com/google/uuid v1.4.0 github.com/michaelquigley/pfxlog v0.6.10 github.com/openziti/agent v1.0.16 - github.com/openziti/channel/v2 v2.0.105 - github.com/openziti/fablab v0.5.25 - github.com/openziti/foundation/v2 v2.0.33 - github.com/openziti/identity v1.0.66 - github.com/openziti/sdk-golang v0.20.129 + github.com/openziti/channel/v2 v2.0.110 + github.com/openziti/fablab v0.5.32 + github.com/openziti/foundation/v2 v2.0.35 + github.com/openziti/identity v1.0.68 + github.com/openziti/sdk-golang v0.20.139 github.com/openziti/storage v0.2.23 - github.com/openziti/transport/v2 v2.0.113 + github.com/openziti/transport/v2 v2.0.119 github.com/openziti/ziti v0.28.3 github.com/pkg/errors v0.9.1 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 github.com/sirupsen/logrus v1.9.3 - github.com/spf13/cobra v1.7.0 + github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.8.4 go.etcd.io/bbolt v1.3.8 - golang.org/x/net v0.17.0 + golang.org/x/net v0.19.0 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -40,7 +40,7 @@ require ( github.com/antlr4-go/antlr/v4 v4.13.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go v1.47.0 // indirect + github.com/aws/aws-sdk-go v1.47.10 // indirect github.com/biogo/store v0.0.0-20200525035639-8c94ae1e7c9c // indirect github.com/blang/semver v3.5.1+incompatible // indirect github.com/boltdb/bolt v1.3.1 // indirect @@ -56,12 +56,12 @@ require ( github.com/ef-ds/deque v1.0.4 // indirect github.com/eliukblau/pixterm/pkg/ansimage v0.0.0-20191210081756-9fb6cf8c2f75 // indirect github.com/emirpasic/gods v1.18.1 // indirect - github.com/fatih/color v1.15.0 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/felixge/httpsnoop v1.0.1 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa // indirect github.com/go-acme/lego/v4 v4.14.2 // indirect - github.com/go-jose/go-jose/v3 v3.0.0 // indirect + github.com/go-jose/go-jose/v3 v3.0.1 // indirect github.com/go-logr/logr v1.3.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect @@ -80,10 +80,10 @@ require ( github.com/golang/protobuf v1.5.3 // indirect github.com/gomarkdown/markdown v0.0.0-20230922112808-5421fefb8386 // indirect github.com/gorilla/handlers v1.5.1 // indirect - github.com/gorilla/mux v1.8.0 // indirect + github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/schema v1.2.0 // indirect github.com/gorilla/securecookie v1.1.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.1 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-msgpack v0.5.5 // indirect @@ -128,11 +128,11 @@ require ( github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/openziti/dilithium v0.3.3 // indirect - github.com/openziti/edge-api v0.26.0 // indirect + github.com/openziti/edge-api v0.26.1 // indirect github.com/openziti/jwks v1.0.3 // indirect - github.com/openziti/metrics v1.2.37 // indirect + github.com/openziti/metrics v1.2.40 // indirect github.com/openziti/runzmd v1.0.33 // indirect - github.com/openziti/secretstream v0.1.13 // indirect + github.com/openziti/secretstream v0.1.14 // indirect github.com/openziti/x509-claims v1.0.3 // indirect github.com/openziti/xweb/v2 v2.1.0 // indirect github.com/openziti/ziti-db-explorer v1.1.3 // indirect @@ -150,7 +150,7 @@ require ( github.com/russross/blackfriday v1.6.0 // indirect github.com/sagikazarmark/locafero v0.3.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect - github.com/shirou/gopsutil/v3 v3.23.9 // indirect + github.com/shirou/gopsutil/v3 v3.23.10 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect github.com/sourcegraph/conc v0.3.0 // indirect @@ -170,22 +170,22 @@ require ( github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect github.com/zitadel/oidc/v2 v2.7.0 // indirect - go.mongodb.org/mongo-driver v1.12.1 // indirect + go.mongodb.org/mongo-driver v1.13.0 // indirect go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 // indirect - go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/metric v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.opentelemetry.io/otel v1.20.0 // indirect + go.opentelemetry.io/otel/metric v1.20.0 // indirect + go.opentelemetry.io/otel/trace v1.20.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.9.0 // indirect - golang.org/x/crypto v0.14.0 // indirect + golang.org/x/crypto v0.16.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect golang.org/x/image v0.13.0 // indirect golang.org/x/mod v0.13.0 // indirect golang.org/x/oauth2 v0.12.0 // indirect - golang.org/x/sync v0.4.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/sync v0.5.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.14.0 // indirect google.golang.org/appengine v1.6.7 // indirect gopkg.in/AlecAivazis/survey.v1 v1.8.7 // indirect diff --git a/zititest/go.sum b/zititest/go.sum index bd8d036db..d77623dac 100644 --- a/zititest/go.sum +++ b/zititest/go.sum @@ -96,8 +96,8 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go v1.47.0 h1:/JUg9V1+xh+qBn8A6ec/l15ETPaMaBqxkjz+gg63dNk= -github.com/aws/aws-sdk-go v1.47.0/go.mod h1:DlEaEbWKZmsITVbqlSVvekPARM1HzeV9PMYg15ymSDA= +github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= +github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -139,7 +139,7 @@ github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7 github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= @@ -181,8 +181,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= @@ -206,8 +206,8 @@ github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo= -github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= +github.com/go-jose/go-jose/v3 v3.0.1 h1:pWmKFVtt+Jl0vBZTIpz/eAKwsm6LkIxDVVbFHKkchhA= +github.com/go-jose/go-jose/v3 v3.0.1/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -380,15 +380,15 @@ github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/schema v1.2.0 h1:YufUaxZYCKGFuAq3c96BOhjgd5nmXiOY9NGzF247Tsc= github.com/gorilla/schema v1.2.0/go.mod h1:kgLaKoK1FELgZqMAVxx/5cbj0kT+57qxUrAlIO2eleU= github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= @@ -626,32 +626,32 @@ github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYr github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openziti/agent v1.0.16 h1:9Saji+8hFE1NpzP2XzDhsVJbCrDlhixoLHfOpFt5Z+U= github.com/openziti/agent v1.0.16/go.mod h1:zfm53+PVWoGFzjGGgQdKby5749G6VRYHe+eQJmoVKy4= -github.com/openziti/channel/v2 v2.0.105 h1:WT2zFF7krZkYUfuXA+4tQxhYiiVWlldD3mKX3qJU9Ww= -github.com/openziti/channel/v2 v2.0.105/go.mod h1:++bV6FFgGUNxaBu7iOkkCa6rSiueU34Kd6f2LSCrEtU= +github.com/openziti/channel/v2 v2.0.110 h1:vBEesJe3XZhdGwa0PRaZBdwOetvmp1m+oIW9gwLEa4k= +github.com/openziti/channel/v2 v2.0.110/go.mod h1:abw0qwT0MzWvh1eI2P6D6CD17PRHL8EEo1d3DHCyCdM= github.com/openziti/dilithium v0.3.3 h1:PLgQ6PMNLSTzCFbX/h98cmudgz/cU6TmjdSv5NAPD8k= github.com/openziti/dilithium v0.3.3/go.mod h1:vsCjI2AU/hon9e+dLhUFbCNGesJDj2ASgkySOcpmvjo= -github.com/openziti/edge-api v0.26.0 h1:082hXjj8rnyMBZHYiB6jb4n7mCXtdMXpF2iCqZOv4IM= -github.com/openziti/edge-api v0.26.0/go.mod h1:/e1pK92L471fvOAwE/hLX5sqBuuo+NwI8vmL04dUHsM= -github.com/openziti/fablab v0.5.25 h1:KxbhNFeX40TlB1Ot+KnEZos0LYtTs77dNekIMRDLvEg= -github.com/openziti/fablab v0.5.25/go.mod h1:uUY3gr4IcGL6vsxBX7gA/b/StF0mHsICkW8HZBvkx9o= -github.com/openziti/foundation/v2 v2.0.33 h1:8CP+fi4KsmzA4jDi54jibwFWWxKpd0rSiplzN9Z0Isw= -github.com/openziti/foundation/v2 v2.0.33/go.mod h1:dWR0g3NOka3uKz9MgUHq6dmuRLmSvunkyeuOXEW/5qU= -github.com/openziti/identity v1.0.66 h1:wCIVNCoiHmeicC9yM15FC0xe6jSic879ztN63fSD6hM= -github.com/openziti/identity v1.0.66/go.mod h1:grReHVqBwhECrnrAZCxNw4ZpA2I1ox66tYfPkfGuKJY= +github.com/openziti/edge-api v0.26.1 h1:osj2irTMMvoP5jLQwJOIKFEellK6AFyT6wB0NzDdalY= +github.com/openziti/edge-api v0.26.1/go.mod h1:bHEkOF9UTjGgjHhmsjnxxNybdijJ91jpdG1WFc9morU= +github.com/openziti/fablab v0.5.32 h1:F2n3m+EZ9ulXUnnox2x6SjsuYQkuNnSao62FaLhLSUA= +github.com/openziti/fablab v0.5.32/go.mod h1:qgW8yiZ7lXuE0FZ85pL4t4ohD5JAnNU1r4EdGLs2TM4= +github.com/openziti/foundation/v2 v2.0.35 h1:4VaMwZ2kAy6jwBYeQIBN2m8rcGroTDX4A2Jp7NAKb6M= +github.com/openziti/foundation/v2 v2.0.35/go.mod h1:Xnb3IxP1e1UcgLggqSunEpCjH3iHozkPi9Bd9GESbwo= +github.com/openziti/identity v1.0.68 h1:SaFr7BeFQBoWQDiT28vUb8D9w7v6lIAK6/9RkwmV0OU= +github.com/openziti/identity v1.0.68/go.mod h1:HbOu3TQ032v8xE6xZWjO51azF4fUxRLjO/l/oGqJwUI= github.com/openziti/jwks v1.0.3 h1:hf8wkb+Cg4nH/HM0KROFd7u+C3DkRVcFZJ7tDV+4icc= github.com/openziti/jwks v1.0.3/go.mod h1:t4xxq8vlXGsPn29kiQVnZBBDDnEoOFqtJoHibkJunQQ= -github.com/openziti/metrics v1.2.37 h1:5yWvMwQT6X43LDlNVcUtqAPJQXfKtbWSYoCIiOfXztg= -github.com/openziti/metrics v1.2.37/go.mod h1:jIL9iilxby8tR98C18uZaSe6bRG15ItR8XF2hmMt8vs= +github.com/openziti/metrics v1.2.40 h1:gySRgR8prCPqaEjmUtX0eXFs7NkI9uPAzp+z6A8+JqA= +github.com/openziti/metrics v1.2.40/go.mod h1:HXdVryf3xpZfnY4VcaOjMxiBv+qw0wJlEJNLbooB9hY= github.com/openziti/runzmd v1.0.33 h1:tOyjRoUuVXIo1z1pNU32jALWkMmhzsSaDrhLtuOn3Ts= github.com/openziti/runzmd v1.0.33/go.mod h1:8c/uvZR/XWXQNllTq6LuTpfKL2DTNxfI2X2wYhgRwik= -github.com/openziti/sdk-golang v0.20.129 h1:FjvXsGFxEiHq89sNyLSvNymruACFW5tbhkgZ3VCg2pE= -github.com/openziti/sdk-golang v0.20.129/go.mod h1:ZpJ7HCcIQbp8XiSno3YXkfhoDIbgjCjS2ScK2bda8eo= -github.com/openziti/secretstream v0.1.13 h1:grp53Q5gCFPXv6okwWHDVvqBBk2BhD0ikHwfV3Adhnc= -github.com/openziti/secretstream v0.1.13/go.mod h1:M4DYavDc3TVF/eemNqp5Fa+zGuYTNa0HTGSz/GkgUzA= +github.com/openziti/sdk-golang v0.20.139 h1:1TaRTd5KmSrfHR6W3ASuj651o37h4NOXTRC6K53Pf3k= +github.com/openziti/sdk-golang v0.20.139/go.mod h1:z2gUWwonLa+haq40cfsNE2P23RoD+SZhxWulG7w7aI0= +github.com/openziti/secretstream v0.1.14 h1:Ta+nB5Prcct+L5LIKUA1nE56QhWS6lMPQYTlpxUltU0= +github.com/openziti/secretstream v0.1.14/go.mod h1:/hhuLfu+GIv0+cnapfsu/VOnXEvmTt3GKtCu+lQ0RIw= github.com/openziti/storage v0.2.23 h1:R5ZBGDGC/LvOz3fE/GlevwbPZ3HL7VxYEvlhKuezvNU= github.com/openziti/storage v0.2.23/go.mod h1:NZCrN2dLtRU73McVEflK5prDgYds9J54mMNz5DmgvZE= -github.com/openziti/transport/v2 v2.0.113 h1:xFPd1W00KqkFb62rRsRXmLqfgr9d9uk0CAVZegvtGhA= -github.com/openziti/transport/v2 v2.0.113/go.mod h1:TSDHV7RTGg/FinzfOP8cg86O53BCabXedANh3eUNics= +github.com/openziti/transport/v2 v2.0.119 h1:KOgHU+9EZUVPvv8ncifqHmNEcFUHbJHigo3jyPvWnOc= +github.com/openziti/transport/v2 v2.0.119/go.mod h1:H2IIBP6ed9isE/eJHGXtAZL0d73ApYOpLG9sSvutNNI= github.com/openziti/x509-claims v1.0.3 h1:HNdQ8Nf1agB3lBs1gahcO6zfkeS4S5xoQ2/PkY4HRX0= github.com/openziti/x509-claims v1.0.3/go.mod h1:Z0WIpBm6c4ecrpRKrou6Gk2wrLWxJO/+tuUwKh8VewE= github.com/openziti/xweb/v2 v2.1.0 h1:Xhh3C2pZkq/Prr65V+SfFSibLDYteoc4f62KQCcTZF4= @@ -742,8 +742,8 @@ github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6g github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shirou/gopsutil/v3 v3.23.9 h1:ZI5bWVeu2ep4/DIxB4U9okeYJ7zp/QLTO4auRb/ty/E= -github.com/shirou/gopsutil/v3 v3.23.9/go.mod h1:x/NWSb71eMcjFIO0vhyGW5nZ7oSIgVjrCnADckb85GA= +github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= +github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= @@ -802,8 +802,8 @@ github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -889,8 +889,8 @@ go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsX go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= -go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecqgE= -go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= +go.mongodb.org/mongo-driver v1.13.0 h1:67DgFFjYOCMWdtTEmKFpV3ffWlFnh+CYZ8ZS/tXWUfY= +go.mongodb.org/mongo-driver v1.13.0/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 h1:CCriYyAfq1Br1aIYettdHZTy8mBTIPo7We18TuO/bak= go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= @@ -901,13 +901,13 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= +go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= +go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= +go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= +go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= @@ -947,8 +947,9 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1049,8 +1050,9 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1082,8 +1084,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180606202747-9527bec2660b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1169,16 +1171,17 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1192,8 +1195,9 @@ golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/zititest/models/sdk-hosting-test/configs/ctrl.yml.tmpl b/zititest/models/sdk-hosting-test/configs/ctrl.yml.tmpl index f54e8478b..5a134a115 100644 --- a/zititest/models/sdk-hosting-test/configs/ctrl.yml.tmpl +++ b/zititest/models/sdk-hosting-test/configs/ctrl.yml.tmpl @@ -5,7 +5,7 @@ raft: minClusterSize: 3 dataDir: /home/{{ .Model.MustVariable "credentials.ssh.username" }}/fablab/ctrldata {{else}} -db: /home/{{ .Model.MustVariable "credentials.ssh.username" }}/fablab/ctrl.db +db: /home/{{ .Model.MustVariable "credentials.ssh.username" }}/ctrl.db {{end}} identity: @@ -36,30 +36,31 @@ ctrl: # connections. The value of newListener must be resolvable both via DNS and validate via certificates #newListener: tls:localhost:6262 -#events: -# jsonLogger: -# subscriptions: -# - type: fabric.routers -# - type: fabric.terminators +events: + jsonLogger: + subscriptions: + - type: entityChange + - type: edge.apiSessions + - type: edge.entityCounts + interval: 15s + - type: edge.sessions + - type: fabric.routers + - type: fabric.terminators # - type: metrics # sourceFilter: .* # metricFilter: .*egress.*m1_rate* # - type: fabric.circuits # include: # - created -# - type: edge.sessions # include: # - created -# - type: edge.apiSessions # - type: fabric.usage # - type: services # - type: fabric.usage -# - type: edge.entityCounts -# interval: 5s -# handler: -# type: file -# format: json -# path: /tmp/ziti-events.log + handler: + type: file + format: json + path: /home/{{ .Model.MustVariable "credentials.ssh.username" }}/logs/event.log healthChecks: boltCheck: diff --git a/zititest/models/sdk-hosting-test/configs/router.yml.tmpl b/zititest/models/sdk-hosting-test/configs/router.yml.tmpl index 0f5bd0e01..72999dd24 100644 --- a/zititest/models/sdk-hosting-test/configs/router.yml.tmpl +++ b/zititest/models/sdk-hosting-test/configs/router.yml.tmpl @@ -41,7 +41,7 @@ listeners: {{if .Component.HasTag "tunneler"}} - binding: tunnel options: - mode: tproxy + mode: host {{end}} - binding: edge address: tls:0.0.0.0:6262 diff --git a/zititest/models/sdk-hosting-test/main.go b/zititest/models/sdk-hosting-test/main.go index c4e462857..ba1399bcf 100644 --- a/zititest/models/sdk-hosting-test/main.go +++ b/zititest/models/sdk-hosting-test/main.go @@ -3,6 +3,7 @@ package main import ( "embed" _ "embed" + "errors" "fmt" "github.com/openziti/fablab" "github.com/openziti/fablab/kernel/lib/actions" @@ -26,28 +27,23 @@ import ( "github.com/openziti/ziti/zititest/zitilab/models" "go.etcd.io/bbolt" "os" + "os/exec" "path" "strings" "time" ) -const TargetZitiVersion = "v0.30.5" +// const TargetZitiVersion = "v0.31.0" -//go:embed configs -var configResource embed.FS +const TargetZitiVersion = "" +const TargetZitiEdgeTunnelVersion = "" -type scaleStrategy struct{} +//const TargetZitiEdgeTunnelVersion = "0.22.12" -func (self scaleStrategy) IsScaled(entity model.Entity) bool { - return entity.GetType() == model.EntityTypeHost && entity.GetScope().HasTag("scaled") -} +var TunnelType = "!zet" -func (self scaleStrategy) GetEntityCount(entity model.Entity) uint32 { - if entity.GetType() == model.EntityTypeHost && entity.GetScope().HasTag("scaled") { - return 4 - } - return 1 -} +//go:embed configs +var configResource embed.FS type dbStrategy struct{} @@ -75,7 +71,7 @@ func (d dbStrategy) PostProcess(router *persistence.EdgeRouter, c *model.Compone } c.Scope.Tags = append(c.Scope.Tags, "edge-router") c.Scope.Tags = append(c.Scope.Tags, "pre-created") - c.Host.InstanceType = "c5.large" + c.Host.InstanceType = "c5.xlarge" c.Type.(*zitilab.RouterType).Version = TargetZitiVersion } @@ -113,6 +109,8 @@ func (d dbStrategy) CreateIdentityHosts(tx *bbolt.Tx, m *model.Model, builder *m } } + fmt.Printf("service count: %v\n", servicesCount) + regionCount := len(m.Regions) perRegion := servicesCount / regionCount @@ -151,7 +149,7 @@ func (d dbStrategy) CreateIdentityHosts(tx *bbolt.Tx, m *model.Model, builder *m Scope: model.Scope{Tags: model.Tags{}}, Region: region, Components: model.Components{}, - InstanceType: "t3.medium", + InstanceType: "t3.xlarge", } hostId := fmt.Sprintf("%s_svc_hosts_%v", regionId, i) region.Hosts[hostId] = tunnelsHost @@ -165,13 +163,30 @@ func (d dbStrategy) CreateIdentityHosts(tx *bbolt.Tx, m *model.Model, builder *m svcCount := hostingIdentities[identityId] + getConfigPath := func(c *model.Component) string { + user := c.GetHost().GetSshUser() + return fmt.Sprintf("/home/%s/etc/%s.json", user, c.Id) + } + + var tunnelType model.ComponentType + if TunnelType == "zet" { + tunnelType = &zitilab.ZitiEdgeTunnelType{ + Version: TargetZitiEdgeTunnelVersion, + LogConfig: "'2;bind.c=6'", + ConfigPathF: getConfigPath, + } + } else { + tunnelType = &zitilab.ZitiTunnelType{ + Mode: zitilab.ZitiTunnelModeHost, + Version: TargetZitiVersion, + ConfigPathF: getConfigPath, + } + } + tunnelComponent := &model.Component{ Scope: model.Scope{Tags: model.Tags{"sdk-tunneler", "pre-created", fmt.Sprintf("serviceCount=%v", svcCount)}}, - Type: &zitilab.ZitiTunnelType{ - Mode: zitilab.ZitiTunnelModeHost, - Version: TargetZitiVersion, - }, - Host: tunnelHost, + Type: tunnelType, + Host: tunnelHost, } tunnelHost.Components[identityId] = tunnelComponent } @@ -183,7 +198,7 @@ func (d dbStrategy) CreateIdentityHosts(tx *bbolt.Tx, m *model.Model, builder *m var dbStrategyInstance = dbStrategy{} var m = &model.Model{ - Id: "router-test", + Id: "sdk-hosting-test", Scope: model.Scope{ Defaults: model.Variables{ "environment": "sdk-hosting-test", @@ -208,7 +223,6 @@ var m = &model.Model{ }, }, StructureFactories: []model.Factory{ - model.NewScaleFactoryWithDefaultEntityFactory(scaleStrategy{}), &models.ZitiDbBuilder{Strategy: dbStrategyInstance}, }, Resources: model.Resources{ @@ -222,7 +236,7 @@ var m = &model.Model{ Site: "us-east-1a", Hosts: model.Hosts{ "ctrl": { - InstanceType: "c5.large", + InstanceType: "c5.xlarge", Components: model.Components{ "ctrl": { Scope: model.Scope{Tags: model.Tags{"ctrl"}}, @@ -240,16 +254,15 @@ var m = &model.Model{ "bootstrap": model.ActionBinder(func(m *model.Model) model.Action { workflow := actions.Workflow() - //workflow.AddAction(component.Stop("*")) - //workflow.AddAction(host.GroupExec("*", 25, "rm -f logs/*")) - workflow.AddAction(component.Start("#ctrl")) workflow.AddAction(semaphore.Sleep(2 * time.Second)) workflow.AddAction(edge.Login("#ctrl")) workflow.AddAction(edge.ReEnrollEdgeRouters(".edge-router .pre-created", 2)) - workflow.AddAction(edge.ReEnrollIdentities(".sdk-tunneler .pre-created", 10)) + if quickRun, _ := m.GetBoolVariable("quick_run"); !quickRun { + workflow.AddAction(edge.ReEnrollIdentities(".sdk-tunneler .pre-created", 10)) + } return workflow }), "stop": model.Bind(component.StopInParallelHostExclusive("*", 15)), @@ -258,6 +271,44 @@ var m = &model.Model{ host.GroupExec("*", 25, "rm -f logs/*"), )), "login": model.Bind(edge.Login("#ctrl")), + "refreshCtrlZiti": model.ActionBinder(func(m *model.Model) model.Action { + return model.ActionFunc(func(run model.Run) error { + zitiPath, err := exec.LookPath("ziti") + if err != nil { + return err + } + + deferred := rsync.NewRsyncHost("ctrl", zitiPath, "/home/ubuntu/fablab/bin/ziti") + return deferred.Execute(run) + }) + }), + "refreshRouterZiti": model.ActionBinder(func(m *model.Model) model.Action { + return model.ActionFunc(func(run model.Run) error { + zitiPath, err := exec.LookPath("ziti") + if err != nil { + return err + } + + deferred := rsync.NewRsyncHost("component.edge-router", zitiPath, "/home/ubuntu/fablab/bin/ziti") + return deferred.Execute(run) + }) + }), + "refreshZiti": model.ActionBinder(func(m *model.Model) model.Action { + return model.ActionFunc(func(run model.Run) error { + zitiPath, err := exec.LookPath("ziti") + if err != nil { + return err + } + + hosts := os.Getenv("HOSTS") + if hosts == "" { + return errors.New("expected hosts to refresh in HOSTS env") + } + + deferred := rsync.NewRsyncHost(hosts, zitiPath, "/home/ubuntu/fablab/bin/ziti") + return deferred.Execute(run) + }) + }), }, Infrastructure: model.Stages{ @@ -272,12 +323,14 @@ var m = &model.Model{ Distribution: model.Stages{ distribution.DistributeSshKey("*"), - distribution.Locations("*", "logs"), rsync.RsyncStaged(), model.StageActionF(func(run model.Run) error { - dbFile := dbStrategyInstance.GetDbFile(run.GetModel()) - deferred := rsync.NewRsyncHost("#ctrl", dbFile, "/home/ubuntu/fablab/ctrl.db") - return deferred.Execute(run) + if quickRun, _ := run.GetModel().GetBoolVariable("quick_run"); !quickRun { + dbFile := dbStrategyInstance.GetDbFile(run.GetModel()) + deferred := rsync.NewRsyncHost("#ctrl", dbFile, "/home/ubuntu/ctrl.db") + return deferred.Execute(run) + } + return nil }), }, diff --git a/zititest/zitilab/component_common.go b/zititest/zitilab/component_common.go index 7d4df7474..fde736691 100644 --- a/zititest/zitilab/component_common.go +++ b/zititest/zitilab/component_common.go @@ -35,14 +35,9 @@ func getZitiProcessFilter(c *model.Component, zitiType string) func(string) bool } func startZitiComponent(c *model.Component, zitiType string, version string, configName string) error { - binaryName := "ziti" - if version != "" { - binaryName += "-" + version - } - user := c.GetHost().GetSshUser() - binaryPath := fmt.Sprintf("/home/%s/fablab/bin/%s", user, binaryName) + binaryPath := getZitiBinaryPath(c, version) configPath := fmt.Sprintf("/home/%s/fablab/cfg/%s", user, configName) logsPath := fmt.Sprintf("/home/%s/logs/%s.log", user, c.Id) @@ -53,7 +48,7 @@ func startZitiComponent(c *model.Component, zitiType string, version string, con serviceCmd := fmt.Sprintf("nohup %s %s %s run --log-formatter pfxlog %s --cli-agent-alias %s > %s 2>&1 &", useSudo, binaryPath, zitiType, configPath, c.Id, logsPath) - + logrus.Info(serviceCmd) value, err := c.GetHost().ExecLogged(serviceCmd) if err != nil { return err @@ -66,14 +61,26 @@ func startZitiComponent(c *model.Component, zitiType string, version string, con return nil } -func getPrefixVersion(version string) string { - if version == "" || strings.HasPrefix(version, "v") { - return version +func canonicalizeZitiVersion(version *string) { + if version != nil { + if *version != "" && *version != "latest" && !strings.HasPrefix(*version, "v") { + *version = "v" + *version + } } - return "v" + version } -func reEnrollIdentity(run model.Run, c *model.Component, binaryName string, configName string) error { +func getZitiBinaryPath(c *model.Component, version string) string { + binaryName := "ziti" + if version != "" { + binaryName += "-" + version + } + + user := c.GetHost().GetSshUser() + + return fmt.Sprintf("/home/%s/fablab/bin/%s", user, binaryName) +} + +func reEnrollIdentity(run model.Run, c *model.Component, zitiBinaryPath string, configPath string) error { if err := zitilib_actions.EdgeExec(run.GetModel(), "delete", "authenticator", "where", fmt.Sprintf("identity=\"%v\"", c.Id)); err != nil { return err } @@ -90,13 +97,14 @@ func reEnrollIdentity(run model.Run, c *model.Component, binaryName string, conf return err } - remoteJwt := "/home/ubuntu/fablab/cfg/" + c.Id + ".jwt" + configDir := filepath.Dir(configPath) + remoteJwt := configDir + c.Id + ".jwt" if err := c.GetHost().SendFile(jwtFileName, remoteJwt); err != nil { return err } - tmpl := "set -o pipefail; /home/ubuntu/fablab/bin/%s edge enroll %s 2>&1 | tee /home/ubuntu/logs/%s.identity.enroll.log " - cmd := fmt.Sprintf(tmpl, binaryName, remoteJwt, c.Id) + tmpl := "set -o pipefail; mkdir -p %s; %s edge enroll %s -o %s 2>&1 | tee /home/ubuntu/logs/%s.identity.enroll.log " + cmd := fmt.Sprintf(tmpl, configDir, zitiBinaryPath, remoteJwt, configPath, c.Id) return c.GetHost().ExecLogOnlyOnError(cmd) } diff --git a/zititest/zitilab/component_controller.go b/zititest/zitilab/component_controller.go index 65e6382c7..976e74f90 100644 --- a/zititest/zitilab/component_controller.go +++ b/zititest/zitilab/component_controller.go @@ -25,7 +25,6 @@ import ( "github.com/openziti/ziti/zititest/zitilab/stageziti" "github.com/pkg/errors" "io/fs" - "strings" ) var _ model.ComponentType = (*ControllerType)(nil) @@ -47,9 +46,7 @@ type ControllerType struct { } func (self *ControllerType) InitType(*model.Component) { - if self.Version != "" && self.Version != "latest" && !strings.HasPrefix(self.Version, "v") { - self.Version = "v" + self.Version - } + canonicalizeZitiVersion(&self.Version) } func (self *ControllerType) GetActions() map[string]model.ComponentAction { @@ -134,9 +131,10 @@ func (self *ControllerType) InitStandalone(run model.Run, c *model.Component) er binaryName += "-" + self.Version } + binaryPath := getZitiBinaryPath(c, self.Version) configPath := fmt.Sprintf("/home/%s/fablab/cfg/%s", factory.User(), self.getConfigName(c)) - tmpl := "rm -f /home/%v/fablab/ctrl.db && set -o pipefail; /home/%s/fablab/bin/%s controller --log-formatter pfxlog edge init %s -u %s -p %s 2>&1 | tee logs/controller.edge.init.log" - cmd := fmt.Sprintf(tmpl, factory.User(), factory.User(), binaryName, configPath, username, password) + tmpl := "rm -f /home/%v/fablab/ctrl.db && set -o pipefail; %s controller --log-formatter pfxlog edge init %s -u %s -p %s 2>&1 | tee logs/controller.edge.init.log" + cmd := fmt.Sprintf(tmpl, factory.User(), binaryPath, configPath, username, password) return host.Exec(c.GetHost(), cmd).Execute(run) } diff --git a/zititest/zitilab/component_echo_server.go b/zititest/zitilab/component_echo_server.go index b0425c42d..1a2472e13 100644 --- a/zititest/zitilab/component_echo_server.go +++ b/zititest/zitilab/component_echo_server.go @@ -18,9 +18,7 @@ type EchoServerType struct { } func (self *EchoServerType) InitType(*model.Component) { - if self.Version != "" && self.Version != "latest" && !strings.HasPrefix(self.Version, "v") { - self.Version = "v" + self.Version - } + canonicalizeZitiVersion(&self.Version) } func (self *EchoServerType) Dump() any { @@ -48,14 +46,9 @@ func (self *EchoServerType) IsRunning(_ model.Run, c *model.Component) (bool, er } func (self *EchoServerType) Start(_ model.Run, c *model.Component) error { - binaryName := "ziti" - if self.Version != "" { - binaryName += "-" + self.Version - } - user := c.GetHost().GetSshUser() - binaryPath := fmt.Sprintf("/home/%s/fablab/bin/%s", user, binaryName) + binaryPath := getZitiBinaryPath(c, self.Version) configPath := fmt.Sprintf("/home/%s/fablab/cfg/%s.json", user, c.Id) logsPath := fmt.Sprintf("/home/%s/logs/%s.log", user, c.Id) diff --git a/zititest/zitilab/component_router.go b/zititest/zitilab/component_router.go index 73d1f1f3f..6b4cafd81 100644 --- a/zititest/zitilab/component_router.go +++ b/zititest/zitilab/component_router.go @@ -45,9 +45,7 @@ type RouterType struct { } func (self *RouterType) InitType(*model.Component) { - if self.Version != "" && self.Version != "latest" && !strings.HasPrefix(self.Version, "v") { - self.Version = "v" + self.Version - } + canonicalizeZitiVersion(&self.Version) } func (self *RouterType) GetActions() map[string]model.ComponentAction { @@ -106,15 +104,6 @@ func (self *RouterType) getConfigName(c *model.Component) string { return configName } -func (self *RouterType) getBinaryName() string { - binaryName := "ziti" - version := self.Version - if version != "" { - binaryName += "-" + version - } - return binaryName -} - func (self *RouterType) getProcessFilter(c *model.Component) func(string) bool { return getZitiProcessFilter(c, "router") } @@ -173,8 +162,8 @@ func (self *RouterType) CreateAndEnroll(run model.Run, c *model.Component) error return err } - tmpl := "set -o pipefail; /home/ubuntu/fablab/bin/%v router enroll /home/ubuntu/fablab/cfg/%s -j %s 2>&1 | tee /home/ubuntu/logs/%s.router.enroll.log " - cmd := fmt.Sprintf(tmpl, self.getBinaryName(), self.getConfigName(c), remoteJwt, c.Id) + tmpl := "set -o pipefail; %s router enroll /home/ubuntu/fablab/cfg/%s -j %s 2>&1 | tee /home/ubuntu/logs/%s.router.enroll.log " + cmd := fmt.Sprintf(tmpl, getZitiBinaryPath(c, self.Version), self.getConfigName(c), remoteJwt, c.Id) return c.GetHost().ExecLogOnlyOnError(cmd) } @@ -193,8 +182,8 @@ func (self *RouterType) ReEnroll(_ model.Run, c *model.Component) error { return err } - tmpl := "set -o pipefail; /home/ubuntu/fablab/bin/%s router enroll /home/ubuntu/fablab/cfg/%s -j %s 2>&1 | tee /home/ubuntu/logs/%s.router.enroll.log " - cmd := fmt.Sprintf(tmpl, self.getBinaryName(), self.getConfigName(c), remoteJwt, c.Id) + tmpl := "set -o pipefail; %s router enroll /home/ubuntu/fablab/cfg/%s -j %s 2>&1 | tee /home/ubuntu/logs/%s.router.enroll.log " + cmd := fmt.Sprintf(tmpl, getZitiBinaryPath(c, self.Version), self.getConfigName(c), remoteJwt, c.Id) return c.GetHost().ExecLogOnlyOnError(cmd) } diff --git a/zititest/zitilab/component_zcat.go b/zititest/zitilab/component_zcat.go index d7e5f3645..e5b589de3 100644 --- a/zititest/zitilab/component_zcat.go +++ b/zititest/zitilab/component_zcat.go @@ -16,9 +16,7 @@ type ZCatType struct { } func (self *ZCatType) InitType(*model.Component) { - if self.Version != "" && self.Version != "latest" && !strings.HasPrefix(self.Version, "v") { - self.Version = "v" + self.Version - } + canonicalizeZitiVersion(&self.Version) } func (self *ZCatType) Dump() any { diff --git a/zititest/zitilab/component_ziti_edge_tunnel.go b/zititest/zitilab/component_ziti_edge_tunnel.go index b0948b52d..0d41052a3 100644 --- a/zititest/zitilab/component_ziti_edge_tunnel.go +++ b/zititest/zitilab/component_ziti_edge_tunnel.go @@ -27,8 +27,17 @@ import ( var _ model.ComponentType = (*ZitiEdgeTunnelType)(nil) type ZitiEdgeTunnelType struct { - Version string - LocalPath string + Version string + ZitiVersion string + LocalPath string + LogConfig string + ConfigPathF func(c *model.Component) string +} + +func (self *ZitiEdgeTunnelType) GetActions() map[string]model.ComponentAction { + return map[string]model.ComponentAction{ + ZitiTunnelActionsReEnroll: model.ComponentActionF(self.ReEnroll), + } } func (self *ZitiEdgeTunnelType) Dump() any { @@ -43,6 +52,7 @@ func (self *ZitiEdgeTunnelType) InitType(*model.Component) { if strings.HasPrefix(self.Version, "v") { self.Version = self.Version[1:] } + canonicalizeZitiVersion(&self.ZitiVersion) } func (self *ZitiEdgeTunnelType) getBinaryName() string { @@ -55,7 +65,10 @@ func (self *ZitiEdgeTunnelType) getBinaryName() string { } func (self *ZitiEdgeTunnelType) StageFiles(r model.Run, c *model.Component) error { - return stageziti.StageZitiEdgeTunnelOnce(r, c, self.Version, self.LocalPath) + if err := stageziti.StageZitiEdgeTunnelOnce(r, c, self.Version, self.LocalPath); err != nil { + return err + } + return stageziti.StageZitiOnce(r, c, self.ZitiVersion, self.LocalPath) } func (self *ZitiEdgeTunnelType) getProcessFilter(c *model.Component) func(string) bool { @@ -74,15 +87,27 @@ func (self *ZitiEdgeTunnelType) IsRunning(_ model.Run, c *model.Component) (bool return len(pids) > 0, nil } +func (self *ZitiEdgeTunnelType) GetConfigPath(c *model.Component) string { + if self.ConfigPathF != nil { + return self.ConfigPathF(c) + } + return fmt.Sprintf("/home/%s/fablab/cfg/%s.json", c.GetHost().GetSshUser(), c.Id) +} + func (self *ZitiEdgeTunnelType) Start(_ model.Run, c *model.Component) error { user := c.GetHost().GetSshUser() binaryPath := fmt.Sprintf("/home/%s/fablab/bin/%s", user, self.getBinaryName()) - configPath := fmt.Sprintf("/home/%s/fablab/cfg/%s.json", user, c.Id) + configPath := self.GetConfigPath(c) logsPath := fmt.Sprintf("/home/%s/logs/%s.log", user, c.Id) - serviceCmd := fmt.Sprintf("sudo %s run -i %s > %s 2>&1 &", binaryPath, configPath, logsPath) + logging := "" + if self.LogConfig != "" { + logging = "ZITI_LOG=" + self.LogConfig + " " + } + serviceCmd := fmt.Sprintf("%ssudo %s run -i %s > %s 2>&1 &", logging, binaryPath, configPath, logsPath) + logrus.Infof("starting: %s", serviceCmd) value, err := c.GetHost().ExecLogged(serviceCmd) if err != nil { return err @@ -98,3 +123,7 @@ func (self *ZitiEdgeTunnelType) Start(_ model.Run, c *model.Component) error { func (self *ZitiEdgeTunnelType) Stop(_ model.Run, c *model.Component) error { return c.GetHost().KillProcesses("-TERM", self.getProcessFilter(c)) } + +func (self *ZitiEdgeTunnelType) ReEnroll(run model.Run, c *model.Component) error { + return reEnrollIdentity(run, c, getZitiBinaryPath(c, self.ZitiVersion), self.GetConfigPath(c)) +} diff --git a/zititest/zitilab/component_ziti_tunnel.go b/zititest/zitilab/component_ziti_tunnel.go index b76151db0..8cc0b428f 100644 --- a/zititest/zitilab/component_ziti_tunnel.go +++ b/zititest/zitilab/component_ziti_tunnel.go @@ -50,9 +50,10 @@ func (self ZitiTunnelMode) String() string { } type ZitiTunnelType struct { - Mode ZitiTunnelMode - Version string - LocalPath string + Mode ZitiTunnelMode + Version string + LocalPath string + ConfigPathF func(c *model.Component) string } func (self *ZitiTunnelType) GetActions() map[string]model.ComponentAction { @@ -62,9 +63,7 @@ func (self *ZitiTunnelType) GetActions() map[string]model.ComponentAction { } func (self *ZitiTunnelType) InitType(*model.Component) { - if self.Version != "" && self.Version != "latest" && !strings.HasPrefix(self.Version, "v") { - self.Version = "v" + self.Version - } + canonicalizeZitiVersion(&self.Version) } func (self *ZitiTunnelType) Dump() any { @@ -102,16 +101,11 @@ func (self *ZitiTunnelType) IsRunning(_ model.Run, c *model.Component) (bool, er return len(pids) > 0, nil } -func (self *ZitiTunnelType) GetBinaryName() string { - binaryName := "ziti" - if self.Version != "" { - binaryName += "-" + self.Version +func (self *ZitiTunnelType) GetConfigPath(c *model.Component) string { + if self.ConfigPathF != nil { + return self.ConfigPathF(c) } - return binaryName -} - -func (self *ZitiTunnelType) GetConfigName(c *model.Component) string { - return fmt.Sprintf("%s.json", c.Id) + return fmt.Sprintf("/home/%s/fablab/cfg/%s.json", c.GetHost().GetSshUser(), c.Id) } func (self *ZitiTunnelType) Start(_ model.Run, c *model.Component) error { @@ -119,8 +113,8 @@ func (self *ZitiTunnelType) Start(_ model.Run, c *model.Component) error { user := c.GetHost().GetSshUser() - binaryPath := fmt.Sprintf("/home/%s/fablab/bin/%s", user, self.GetBinaryName()) - configPath := fmt.Sprintf("/home/%s/fablab/cfg/%s", user, self.GetConfigName(c)) + binaryPath := getZitiBinaryPath(c, self.Version) + configPath := self.GetConfigPath(c) logsPath := fmt.Sprintf("/home/%s/logs/%s.log", user, c.Id) useSudo := "" @@ -128,7 +122,7 @@ func (self *ZitiTunnelType) Start(_ model.Run, c *model.Component) error { useSudo = "sudo" } - serviceCmd := fmt.Sprintf("%s %s tunnel %s --log-formatter pfxlog -i %s --cli-agent-alias %s > %s 2>&1 &", + serviceCmd := fmt.Sprintf("%s %s tunnel %s -v --log-formatter pfxlog -i %s --cli-agent-alias %s > %s 2>&1 &", useSudo, binaryPath, mode.String(), configPath, c.Id, logsPath) value, err := c.Host.ExecLogged( @@ -150,5 +144,5 @@ func (self *ZitiTunnelType) Stop(_ model.Run, c *model.Component) error { } func (self *ZitiTunnelType) ReEnroll(run model.Run, c *model.Component) error { - return reEnrollIdentity(run, c, self.GetBinaryName(), self.GetConfigName(c)) + return reEnrollIdentity(run, c, getZitiBinaryPath(c, self.Version), self.GetConfigPath(c)) }