diff --git a/controller/handler_ctrl/bind.go b/controller/handler_ctrl/bind.go index b8687f7f2..25fca9fe3 100644 --- a/controller/handler_ctrl/bind.go +++ b/controller/handler_ctrl/bind.go @@ -41,7 +41,7 @@ func (self *bindHandler) BindChannel(ch channel2.Channel) error { ch.SetLogicalName(self.router.Id) ch.AddReceiveHandler(newSessionRequestHandler(self.router, self.network)) ch.AddReceiveHandler(newRouteResultHandler(self.network, self.router)) - ch.AddReceiveHandler(newSessionConfirmationHandler()) + ch.AddReceiveHandler(newSessionConfirmationHandler(self.network, self.router)) ch.AddReceiveHandler(newCreateTerminatorHandler(self.network, self.router)) ch.AddReceiveHandler(newRemoveTerminatorHandler(self.network)) ch.AddReceiveHandler(newUpdateTerminatorHandler(self.network)) diff --git a/controller/handler_ctrl/session_confirmation.go b/controller/handler_ctrl/session_confirmation.go index db6529c91..d659c0576 100644 --- a/controller/handler_ctrl/session_confirmation.go +++ b/controller/handler_ctrl/session_confirmation.go @@ -17,15 +17,22 @@ package handler_ctrl import ( + "github.com/golang/protobuf/proto" + "github.com/openziti/fabric/controller/network" "github.com/openziti/fabric/ctrl_msg" + "github.com/openziti/fabric/pb/ctrl_pb" "github.com/openziti/foundation/channel2" + "github.com/openziti/foundation/identity/identity" "github.com/sirupsen/logrus" ) -type sessionConfirmationHandler struct{} +type sessionConfirmationHandler struct { + n *network.Network + r *network.Router +} -func newSessionConfirmationHandler() *sessionConfirmationHandler { - return &sessionConfirmationHandler{} +func newSessionConfirmationHandler(n *network.Network, r *network.Router) *sessionConfirmationHandler { + return &sessionConfirmationHandler{n, r} } func (self *sessionConfirmationHandler) ContentType() int32 { @@ -33,5 +40,33 @@ func (self *sessionConfirmationHandler) ContentType() int32 { } func (self *sessionConfirmationHandler) HandleReceive(msg *channel2.Message, ch channel2.Channel) { - logrus.Infof("this controller does not process session confirmation broadcasts. consider upgrading to a newer controller") + logrus.Infof("received session confirmation request from [r/%s]", self.r.Id) + confirm := &ctrl_pb.SessionConfirmation{} + if err := proto.Unmarshal(msg.Body, confirm); err == nil { + for _, sessionId := range confirm.SessionIds { + if _, found := self.n.GetSession(&identity.TokenId{Token: sessionId}); !found { + go self.sendUnroute(sessionId) + } else { + logrus.Debugf("[s/%s] found, ignoring", sessionId) + } + } + } else { + logrus.Errorf("error unmarshaling session confirmation from [r/%s] (%v)", self.r.Id, err) + } +} + +func (self *sessionConfirmationHandler) sendUnroute(sessionId string) { + unroute := &ctrl_pb.Unroute{} + unroute.SessionId = sessionId + unroute.Now = true + if body, err := proto.Marshal(unroute); err == nil { + msg := channel2.NewMessage(int32(ctrl_pb.ContentType_UnrouteType), body) + if err := self.r.Control.Send(msg); err == nil { + logrus.Infof("sent unroute to [r/%s] for [s/%s]", self.r.Id, sessionId) + } else { + logrus.Errorf("error sending unroute to [r/%s] for [s/%s] (%v)", self.r.Id, sessionId, err) + } + } else { + logrus.Errorf("error marshalling unroute to [r/%s] for [s/%s] (%v)", self.r.Id, sessionId, err) + } } \ No newline at end of file diff --git a/pb/ctrl_pb/ctrl.pb.go b/pb/ctrl_pb/ctrl.pb.go index 3947e26a9..5f54864a3 100644 --- a/pb/ctrl_pb/ctrl.pb.go +++ b/pb/ctrl_pb/ctrl.pb.go @@ -1,12 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0-devel +// protoc-gen-go v1.23.0 // protoc v3.14.0 // source: ctrl.proto package ctrl_pb import ( + proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -20,6 +21,10 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + type ContentType int32 const ( @@ -276,6 +281,53 @@ func (x *SessionRequest) GetPeerData() map[uint32][]byte { return nil } +type SessionConfirmation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SessionIds []string `protobuf:"bytes,1,rep,name=sessionIds,proto3" json:"sessionIds,omitempty"` +} + +func (x *SessionConfirmation) Reset() { + *x = SessionConfirmation{} + if protoimpl.UnsafeEnabled { + mi := &file_ctrl_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SessionConfirmation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SessionConfirmation) ProtoMessage() {} + +func (x *SessionConfirmation) ProtoReflect() protoreflect.Message { + mi := &file_ctrl_proto_msgTypes[1] + 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 SessionConfirmation.ProtoReflect.Descriptor instead. +func (*SessionConfirmation) Descriptor() ([]byte, []int) { + return file_ctrl_proto_rawDescGZIP(), []int{1} +} + +func (x *SessionConfirmation) GetSessionIds() []string { + if x != nil { + return x.SessionIds + } + return nil +} + type CreateTerminatorRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -294,7 +346,7 @@ type CreateTerminatorRequest struct { func (x *CreateTerminatorRequest) Reset() { *x = CreateTerminatorRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[1] + mi := &file_ctrl_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -307,7 +359,7 @@ func (x *CreateTerminatorRequest) String() string { func (*CreateTerminatorRequest) ProtoMessage() {} func (x *CreateTerminatorRequest) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[1] + mi := &file_ctrl_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -320,7 +372,7 @@ func (x *CreateTerminatorRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateTerminatorRequest.ProtoReflect.Descriptor instead. func (*CreateTerminatorRequest) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{1} + return file_ctrl_proto_rawDescGZIP(), []int{2} } func (x *CreateTerminatorRequest) GetServiceId() string { @@ -390,7 +442,7 @@ type RemoveTerminatorRequest struct { func (x *RemoveTerminatorRequest) Reset() { *x = RemoveTerminatorRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[2] + mi := &file_ctrl_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -403,7 +455,7 @@ func (x *RemoveTerminatorRequest) String() string { func (*RemoveTerminatorRequest) ProtoMessage() {} func (x *RemoveTerminatorRequest) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[2] + mi := &file_ctrl_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -416,7 +468,7 @@ func (x *RemoveTerminatorRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveTerminatorRequest.ProtoReflect.Descriptor instead. func (*RemoveTerminatorRequest) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{2} + return file_ctrl_proto_rawDescGZIP(), []int{3} } func (x *RemoveTerminatorRequest) GetTerminatorId() string { @@ -439,7 +491,7 @@ type Terminator struct { func (x *Terminator) Reset() { *x = Terminator{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[3] + mi := &file_ctrl_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -452,7 +504,7 @@ func (x *Terminator) String() string { func (*Terminator) ProtoMessage() {} func (x *Terminator) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[3] + mi := &file_ctrl_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -465,7 +517,7 @@ func (x *Terminator) ProtoReflect() protoreflect.Message { // Deprecated: Use Terminator.ProtoReflect.Descriptor instead. func (*Terminator) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{3} + return file_ctrl_proto_rawDescGZIP(), []int{4} } func (x *Terminator) GetId() string { @@ -500,7 +552,7 @@ type ValidateTerminatorsRequest struct { func (x *ValidateTerminatorsRequest) Reset() { *x = ValidateTerminatorsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[4] + mi := &file_ctrl_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -513,7 +565,7 @@ func (x *ValidateTerminatorsRequest) String() string { func (*ValidateTerminatorsRequest) ProtoMessage() {} func (x *ValidateTerminatorsRequest) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[4] + mi := &file_ctrl_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -526,7 +578,7 @@ func (x *ValidateTerminatorsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidateTerminatorsRequest.ProtoReflect.Descriptor instead. func (*ValidateTerminatorsRequest) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{4} + return file_ctrl_proto_rawDescGZIP(), []int{5} } func (x *ValidateTerminatorsRequest) GetTerminators() []*Terminator { @@ -551,7 +603,7 @@ type UpdateTerminatorRequest struct { func (x *UpdateTerminatorRequest) Reset() { *x = UpdateTerminatorRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[5] + mi := &file_ctrl_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -564,7 +616,7 @@ func (x *UpdateTerminatorRequest) String() string { func (*UpdateTerminatorRequest) ProtoMessage() {} func (x *UpdateTerminatorRequest) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[5] + mi := &file_ctrl_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -577,7 +629,7 @@ func (x *UpdateTerminatorRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateTerminatorRequest.ProtoReflect.Descriptor instead. func (*UpdateTerminatorRequest) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{5} + return file_ctrl_proto_rawDescGZIP(), []int{6} } func (x *UpdateTerminatorRequest) GetTerminatorId() string { @@ -627,7 +679,7 @@ type Dial struct { func (x *Dial) Reset() { *x = Dial{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[6] + mi := &file_ctrl_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -640,7 +692,7 @@ func (x *Dial) String() string { func (*Dial) ProtoMessage() {} func (x *Dial) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[6] + mi := &file_ctrl_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -653,7 +705,7 @@ func (x *Dial) ProtoReflect() protoreflect.Message { // Deprecated: Use Dial.ProtoReflect.Descriptor instead. func (*Dial) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{6} + return file_ctrl_proto_rawDescGZIP(), []int{7} } func (x *Dial) GetId() string { @@ -681,7 +733,7 @@ type Link struct { func (x *Link) Reset() { *x = Link{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[7] + mi := &file_ctrl_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -694,7 +746,7 @@ func (x *Link) String() string { func (*Link) ProtoMessage() {} func (x *Link) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[7] + mi := &file_ctrl_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -707,7 +759,7 @@ func (x *Link) ProtoReflect() protoreflect.Message { // Deprecated: Use Link.ProtoReflect.Descriptor instead. func (*Link) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{7} + return file_ctrl_proto_rawDescGZIP(), []int{8} } func (x *Link) GetId() string { @@ -729,7 +781,7 @@ type Fault struct { func (x *Fault) Reset() { *x = Fault{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[8] + mi := &file_ctrl_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -742,7 +794,7 @@ func (x *Fault) String() string { func (*Fault) ProtoMessage() {} func (x *Fault) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[8] + mi := &file_ctrl_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -755,7 +807,7 @@ func (x *Fault) ProtoReflect() protoreflect.Message { // Deprecated: Use Fault.ProtoReflect.Descriptor instead. func (*Fault) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{8} + return file_ctrl_proto_rawDescGZIP(), []int{9} } func (x *Fault) GetSubject() FaultSubject { @@ -786,7 +838,7 @@ type Route struct { func (x *Route) Reset() { *x = Route{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[9] + mi := &file_ctrl_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -799,7 +851,7 @@ func (x *Route) String() string { func (*Route) ProtoMessage() {} func (x *Route) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[9] + mi := &file_ctrl_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -812,7 +864,7 @@ func (x *Route) ProtoReflect() protoreflect.Message { // Deprecated: Use Route.ProtoReflect.Descriptor instead. func (*Route) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{9} + return file_ctrl_proto_rawDescGZIP(), []int{10} } func (x *Route) GetSessionId() string { @@ -855,7 +907,7 @@ type Unroute struct { func (x *Unroute) Reset() { *x = Unroute{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[10] + mi := &file_ctrl_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -868,7 +920,7 @@ func (x *Unroute) String() string { func (*Unroute) ProtoMessage() {} func (x *Unroute) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[10] + mi := &file_ctrl_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -881,7 +933,7 @@ func (x *Unroute) ProtoReflect() protoreflect.Message { // Deprecated: Use Unroute.ProtoReflect.Descriptor instead. func (*Unroute) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{10} + return file_ctrl_proto_rawDescGZIP(), []int{11} } func (x *Unroute) GetSessionId() string { @@ -909,7 +961,7 @@ type InspectRequest struct { func (x *InspectRequest) Reset() { *x = InspectRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[11] + mi := &file_ctrl_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -922,7 +974,7 @@ func (x *InspectRequest) String() string { func (*InspectRequest) ProtoMessage() {} func (x *InspectRequest) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[11] + mi := &file_ctrl_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -935,7 +987,7 @@ func (x *InspectRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use InspectRequest.ProtoReflect.Descriptor instead. func (*InspectRequest) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{11} + return file_ctrl_proto_rawDescGZIP(), []int{12} } func (x *InspectRequest) GetRequestedValues() []string { @@ -958,7 +1010,7 @@ type InspectResponse struct { func (x *InspectResponse) Reset() { *x = InspectResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[12] + mi := &file_ctrl_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -971,7 +1023,7 @@ func (x *InspectResponse) String() string { func (*InspectResponse) ProtoMessage() {} func (x *InspectResponse) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[12] + mi := &file_ctrl_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -984,7 +1036,7 @@ func (x *InspectResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use InspectResponse.ProtoReflect.Descriptor instead. func (*InspectResponse) Descriptor() ([]byte, []int) { - return file_ctrl_proto_rawDescGZIP(), []int{12} + return file_ctrl_proto_rawDescGZIP(), []int{13} } func (x *InspectResponse) GetSuccess() bool { @@ -1022,7 +1074,7 @@ type Route_Egress struct { func (x *Route_Egress) Reset() { *x = Route_Egress{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[15] + mi := &file_ctrl_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1035,7 +1087,7 @@ func (x *Route_Egress) String() string { func (*Route_Egress) ProtoMessage() {} func (x *Route_Egress) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[15] + mi := &file_ctrl_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1048,7 +1100,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{9, 0} + return file_ctrl_proto_rawDescGZIP(), []int{10, 0} } func (x *Route_Egress) GetBinding() string { @@ -1091,7 +1143,7 @@ type Route_Forward struct { func (x *Route_Forward) Reset() { *x = Route_Forward{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[16] + mi := &file_ctrl_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1104,7 +1156,7 @@ func (x *Route_Forward) String() string { func (*Route_Forward) ProtoMessage() {} func (x *Route_Forward) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[16] + mi := &file_ctrl_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1117,7 +1169,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{9, 1} + return file_ctrl_proto_rawDescGZIP(), []int{10, 1} } func (x *Route_Forward) GetSrcAddress() string { @@ -1146,7 +1198,7 @@ type InspectResponse_InspectValue struct { func (x *InspectResponse_InspectValue) Reset() { *x = InspectResponse_InspectValue{} if protoimpl.UnsafeEnabled { - mi := &file_ctrl_proto_msgTypes[18] + mi := &file_ctrl_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1159,7 +1211,7 @@ func (x *InspectResponse_InspectValue) String() string { func (*InspectResponse_InspectValue) ProtoMessage() {} func (x *InspectResponse_InspectValue) ProtoReflect() protoreflect.Message { - mi := &file_ctrl_proto_msgTypes[18] + mi := &file_ctrl_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1172,7 +1224,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{12, 0} + return file_ctrl_proto_rawDescGZIP(), []int{13, 0} } func (x *InspectResponse_InspectValue) GetName() string { @@ -1206,152 +1258,155 @@ var file_ctrl_proto_rawDesc = []byte{ 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, 0x22, 0x8b, 0x03, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 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, 0x18, - 0x0a, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 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, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x4a, 0x0a, 0x08, 0x70, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, - 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 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, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x26, 0x0a, - 0x0e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 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, 0x22, 0x3d, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 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, 0x22, 0x50, 0x0a, 0x0a, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x22, 0x53, 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, 0x35, 0x0a, 0x0b, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 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, 0xdc, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x35, 0x0a, 0x13, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x22, 0x8b, 0x03, 0x0a, 0x17, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x18, 0x0a, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x18, 0x03, 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, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4a, 0x0a, 0x08, 0x70, 0x65, 0x65, + 0x72, 0x44, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x74, + 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x65, + 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, 0x65, 0x65, + 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0a, 0x70, 0x72, 0x65, + 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 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, 0x1a, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 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, 0x22, 0x3d, 0x0a, 0x17, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 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, 0x3d, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, - 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 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, 0x30, 0x0a, 0x04, 0x44, 0x69, 0x61, 0x6c, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 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, 0x22, 0x16, 0x0a, 0x04, 0x4c, 0x69, 0x6e, - 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x22, 0x48, 0x0a, 0x05, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x2f, 0x0a, 0x07, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 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, 0xcc, 0x03, 0x0a, 0x05, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 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, 0x2d, 0x0a, - 0x06, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 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, 0x32, 0x0a, 0x08, - 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, - 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, - 0x1a, 0xdc, 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, 0x3f, 0x0a, 0x08, 0x70, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x23, 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, - 0x49, 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, 0x22, 0x39, 0x0a, 0x07, 0x55, 0x6e, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 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, 0xbc, 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, 0x3d, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 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, - 0x2a, 0x87, 0x03, 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, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 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, 0x0d, 0x0a, 0x08, 0x4c, 0x69, 0x6e, 0x6b, 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, 0xfa, 0x07, 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, 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, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x22, 0x50, 0x0a, 0x0a, 0x54, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x53, 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, 0x35, 0x0a, 0x0b, 0x74, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 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, + 0xdc, 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, 0x3d, 0x0a, 0x0a, 0x70, + 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1d, 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, 0x30, + 0x0a, 0x04, 0x44, 0x69, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 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, + 0x22, 0x16, 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x48, 0x0a, 0x05, 0x46, 0x61, 0x75, 0x6c, + 0x74, 0x12, 0x2f, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x15, 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, 0xcc, 0x03, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 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, 0x2d, 0x0a, 0x06, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 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, 0x32, 0x0a, 0x08, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 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, 0x1a, 0xdc, 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, 0x3f, 0x0a, 0x08, 0x70, 0x65, 0x65, 0x72, + 0x44, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 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, 0x49, 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, 0x22, 0x39, 0x0a, 0x07, 0x55, 0x6e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 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, 0xbc, 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, 0x3d, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, + 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, 0x2a, 0x87, 0x03, 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, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 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, 0x0d, 0x0a, 0x08, 0x4c, 0x69, 0x6e, + 0x6b, 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, 0xfa, + 0x07, 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, 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, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1367,42 +1422,43 @@ func file_ctrl_proto_rawDescGZIP() []byte { } var file_ctrl_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_ctrl_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_ctrl_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_ctrl_proto_goTypes = []interface{}{ (ContentType)(0), // 0: ctrl.pb.ContentType (TerminatorPrecedence)(0), // 1: ctrl.pb.TerminatorPrecedence (FaultSubject)(0), // 2: ctrl.pb.FaultSubject (*SessionRequest)(nil), // 3: ctrl.pb.SessionRequest - (*CreateTerminatorRequest)(nil), // 4: ctrl.pb.CreateTerminatorRequest - (*RemoveTerminatorRequest)(nil), // 5: ctrl.pb.RemoveTerminatorRequest - (*Terminator)(nil), // 6: ctrl.pb.Terminator - (*ValidateTerminatorsRequest)(nil), // 7: ctrl.pb.ValidateTerminatorsRequest - (*UpdateTerminatorRequest)(nil), // 8: ctrl.pb.UpdateTerminatorRequest - (*Dial)(nil), // 9: ctrl.pb.Dial - (*Link)(nil), // 10: ctrl.pb.Link - (*Fault)(nil), // 11: ctrl.pb.Fault - (*Route)(nil), // 12: ctrl.pb.Route - (*Unroute)(nil), // 13: ctrl.pb.Unroute - (*InspectRequest)(nil), // 14: ctrl.pb.InspectRequest - (*InspectResponse)(nil), // 15: ctrl.pb.InspectResponse - nil, // 16: ctrl.pb.SessionRequest.PeerDataEntry - nil, // 17: ctrl.pb.CreateTerminatorRequest.PeerDataEntry - (*Route_Egress)(nil), // 18: ctrl.pb.Route.Egress - (*Route_Forward)(nil), // 19: ctrl.pb.Route.Forward - nil, // 20: ctrl.pb.Route.Egress.PeerDataEntry - (*InspectResponse_InspectValue)(nil), // 21: ctrl.pb.InspectResponse.InspectValue + (*SessionConfirmation)(nil), // 4: ctrl.pb.SessionConfirmation + (*CreateTerminatorRequest)(nil), // 5: ctrl.pb.CreateTerminatorRequest + (*RemoveTerminatorRequest)(nil), // 6: ctrl.pb.RemoveTerminatorRequest + (*Terminator)(nil), // 7: ctrl.pb.Terminator + (*ValidateTerminatorsRequest)(nil), // 8: ctrl.pb.ValidateTerminatorsRequest + (*UpdateTerminatorRequest)(nil), // 9: ctrl.pb.UpdateTerminatorRequest + (*Dial)(nil), // 10: ctrl.pb.Dial + (*Link)(nil), // 11: ctrl.pb.Link + (*Fault)(nil), // 12: ctrl.pb.Fault + (*Route)(nil), // 13: ctrl.pb.Route + (*Unroute)(nil), // 14: ctrl.pb.Unroute + (*InspectRequest)(nil), // 15: ctrl.pb.InspectRequest + (*InspectResponse)(nil), // 16: ctrl.pb.InspectResponse + nil, // 17: ctrl.pb.SessionRequest.PeerDataEntry + nil, // 18: ctrl.pb.CreateTerminatorRequest.PeerDataEntry + (*Route_Egress)(nil), // 19: ctrl.pb.Route.Egress + (*Route_Forward)(nil), // 20: ctrl.pb.Route.Forward + nil, // 21: ctrl.pb.Route.Egress.PeerDataEntry + (*InspectResponse_InspectValue)(nil), // 22: ctrl.pb.InspectResponse.InspectValue } var file_ctrl_proto_depIdxs = []int32{ - 16, // 0: ctrl.pb.SessionRequest.peerData:type_name -> ctrl.pb.SessionRequest.PeerDataEntry - 17, // 1: ctrl.pb.CreateTerminatorRequest.peerData:type_name -> ctrl.pb.CreateTerminatorRequest.PeerDataEntry + 17, // 0: ctrl.pb.SessionRequest.peerData:type_name -> ctrl.pb.SessionRequest.PeerDataEntry + 18, // 1: ctrl.pb.CreateTerminatorRequest.peerData:type_name -> ctrl.pb.CreateTerminatorRequest.PeerDataEntry 1, // 2: ctrl.pb.CreateTerminatorRequest.precedence:type_name -> ctrl.pb.TerminatorPrecedence - 6, // 3: ctrl.pb.ValidateTerminatorsRequest.terminators:type_name -> ctrl.pb.Terminator + 7, // 3: ctrl.pb.ValidateTerminatorsRequest.terminators:type_name -> ctrl.pb.Terminator 1, // 4: ctrl.pb.UpdateTerminatorRequest.precedence:type_name -> ctrl.pb.TerminatorPrecedence 2, // 5: ctrl.pb.Fault.subject:type_name -> ctrl.pb.FaultSubject - 18, // 6: ctrl.pb.Route.egress:type_name -> ctrl.pb.Route.Egress - 19, // 7: ctrl.pb.Route.forwards:type_name -> ctrl.pb.Route.Forward - 21, // 8: ctrl.pb.InspectResponse.values:type_name -> ctrl.pb.InspectResponse.InspectValue - 20, // 9: ctrl.pb.Route.Egress.peerData:type_name -> ctrl.pb.Route.Egress.PeerDataEntry + 19, // 6: ctrl.pb.Route.egress:type_name -> ctrl.pb.Route.Egress + 20, // 7: ctrl.pb.Route.forwards:type_name -> ctrl.pb.Route.Forward + 22, // 8: ctrl.pb.InspectResponse.values:type_name -> ctrl.pb.InspectResponse.InspectValue + 21, // 9: ctrl.pb.Route.Egress.peerData:type_name -> ctrl.pb.Route.Egress.PeerDataEntry 10, // [10:10] is the sub-list for method output_type 10, // [10:10] is the sub-list for method input_type 10, // [10:10] is the sub-list for extension type_name @@ -1429,7 +1485,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateTerminatorRequest); i { + switch v := v.(*SessionConfirmation); i { case 0: return &v.state case 1: @@ -1441,7 +1497,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveTerminatorRequest); i { + switch v := v.(*CreateTerminatorRequest); i { case 0: return &v.state case 1: @@ -1453,7 +1509,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Terminator); i { + switch v := v.(*RemoveTerminatorRequest); i { case 0: return &v.state case 1: @@ -1465,7 +1521,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidateTerminatorsRequest); i { + switch v := v.(*Terminator); i { case 0: return &v.state case 1: @@ -1477,7 +1533,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateTerminatorRequest); i { + switch v := v.(*ValidateTerminatorsRequest); i { case 0: return &v.state case 1: @@ -1489,7 +1545,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Dial); i { + switch v := v.(*UpdateTerminatorRequest); i { case 0: return &v.state case 1: @@ -1501,7 +1557,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Link); i { + switch v := v.(*Dial); i { case 0: return &v.state case 1: @@ -1513,7 +1569,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Fault); i { + switch v := v.(*Link); i { case 0: return &v.state case 1: @@ -1525,7 +1581,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Route); i { + switch v := v.(*Fault); i { case 0: return &v.state case 1: @@ -1537,7 +1593,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Unroute); i { + switch v := v.(*Route); i { case 0: return &v.state case 1: @@ -1549,7 +1605,7 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InspectRequest); i { + switch v := v.(*Unroute); i { case 0: return &v.state case 1: @@ -1561,6 +1617,18 @@ func file_ctrl_proto_init() { } } file_ctrl_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InspectRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ctrl_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InspectResponse); i { case 0: return &v.state @@ -1572,7 +1640,7 @@ func file_ctrl_proto_init() { return nil } } - file_ctrl_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_ctrl_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Route_Egress); i { case 0: return &v.state @@ -1584,7 +1652,7 @@ func file_ctrl_proto_init() { return nil } } - file_ctrl_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_ctrl_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Route_Forward); i { case 0: return &v.state @@ -1596,7 +1664,7 @@ func file_ctrl_proto_init() { return nil } } - file_ctrl_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_ctrl_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InspectResponse_InspectValue); i { case 0: return &v.state @@ -1615,7 +1683,7 @@ func file_ctrl_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_ctrl_proto_rawDesc, NumEnums: 3, - NumMessages: 19, + NumMessages: 20, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/ctrl_pb/ctrl.proto b/pb/ctrl_pb/ctrl.proto index 55337c682..e3b32f152 100644 --- a/pb/ctrl_pb/ctrl.proto +++ b/pb/ctrl_pb/ctrl.proto @@ -32,6 +32,10 @@ message SessionRequest { map peerData = 3; } +message SessionConfirmation { + repeated string sessionIds = 1; +} + enum TerminatorPrecedence { Default = 0; Required = 1; diff --git a/router/forwarder/forwarder.go b/router/forwarder/forwarder.go index c9e65554d..be3eb4f89 100644 --- a/router/forwarder/forwarder.go +++ b/router/forwarder/forwarder.go @@ -33,6 +33,7 @@ type Forwarder struct { sessions *sessionTable destinations *destinationTable faulter *Faulter + scanner *Scanner metricsRegistry metrics.UsageRegistry traceController trace.Controller Options *Options @@ -53,18 +54,19 @@ type XgressDestination interface { GetTimeOfLastRxFromLink() int64 } -func NewForwarder(metricsRegistry metrics.UsageRegistry, faulter *Faulter, options *Options, closeNotify <-chan struct{}) *Forwarder { - forwarder := &Forwarder{ +func NewForwarder(metricsRegistry metrics.UsageRegistry, faulter *Faulter, scanner *Scanner, options *Options, closeNotify <-chan struct{}) *Forwarder { + f := &Forwarder{ sessions: newSessionTable(), destinations: newDestinationTable(), faulter: faulter, + scanner: scanner, metricsRegistry: metricsRegistry, traceController: trace.NewController(closeNotify), Options: options, CloseNotify: closeNotify, } - - return forwarder + f.scanner.setSessionTable(f.sessions) + return f } func (forwarder *Forwarder) MetricsRegistry() metrics.UsageRegistry { diff --git a/router/forwarder/options.go b/router/forwarder/options.go index 3c4868735..bfed8c26f 100644 --- a/router/forwarder/options.go +++ b/router/forwarder/options.go @@ -25,7 +25,10 @@ type Options struct { LatencyProbeInterval time.Duration LatencyProbeTimeout time.Duration XgressCloseCheckInterval time.Duration + XgressDialDwellTime time.Duration FaultTxInterval time.Duration + IdleTxInterval time.Duration + IdleSessionTimeout time.Duration XgressDial WorkerPoolOptions LinkDial WorkerPoolOptions } @@ -38,9 +41,12 @@ type WorkerPoolOptions struct { func DefaultOptions() *Options { return &Options{ LatencyProbeInterval: 10 * time.Second, - LatencyProbeTimeout: 10 * time.Second, + LatencyProbeTimeout: 10 * time.Second, XgressCloseCheckInterval: 5 * time.Second, + XgressDialDwellTime: 0, FaultTxInterval: 15 * time.Second, + IdleTxInterval: 60 * time.Second, + IdleSessionTimeout: 60 * time.Second, XgressDial: WorkerPoolOptions{ QueueLength: 1000, WorkerCount: 10, @@ -79,11 +85,35 @@ func LoadOptions(src map[interface{}]interface{}) (*Options, error) { } } + if value, found := src["xgressDialDwellTime"]; found { + if v, ok := value.(int); ok { + options.XgressDialDwellTime = time.Duration(v) * time.Millisecond + } else { + return nil, errors.New("invalid value for 'xgressDialDwellTime'") + } + } + if value, found := src["faultTxInterval"]; found { if val, ok := value.(int); ok { options.FaultTxInterval = time.Duration(val) * time.Millisecond } else { - return nil, errors.New("invalid value for 'faultTxInterval") + return nil, errors.New("invalid value for 'faultTxInterval'") + } + } + + if value, found := src["idleTxInterval"]; found { + if val, ok := value.(int); ok { + options.IdleTxInterval = time.Duration(val) * time.Millisecond + } else { + return nil, errors.New("invalid value for 'idleTxInterval'") + } + } + + if value, found := src["idleSessionTimeout"]; found { + if val, ok := value.(int); ok { + options.IdleSessionTimeout = time.Duration(val) * time.Millisecond + } else { + return nil, errors.New("invalid value for 'idleSessionTimeout'") } } diff --git a/router/forwarder/scanner.go b/router/forwarder/scanner.go new file mode 100644 index 000000000..9f8c3b47b --- /dev/null +++ b/router/forwarder/scanner.go @@ -0,0 +1,103 @@ +/* + 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 forwarder + +import ( + "github.com/golang/protobuf/proto" + "github.com/openziti/fabric/ctrl_msg" + "github.com/openziti/fabric/pb/ctrl_pb" + "github.com/openziti/foundation/channel2" + "github.com/sirupsen/logrus" + "time" +) + +type Scanner struct { + ctrl channel2.Channel + sessions *sessionTable + interval time.Duration + timeout time.Duration + closeNotify <-chan struct{} +} + +func NewScanner(options *Options, closeNotify <-chan struct{}) *Scanner { + s := &Scanner{ + interval: options.IdleTxInterval, + timeout: options.IdleSessionTimeout, + closeNotify: closeNotify, + } + if s.interval > 0 { + go s.run() + } else { + logrus.Warnf("scanner disabled") + } + return s +} + +func (self *Scanner) SetCtrl(ch channel2.Channel) { + self.ctrl = ch +} + +func (self *Scanner) setSessionTable(sessions *sessionTable) { + self.sessions = sessions +} + +func (self *Scanner) run() { + logrus.Info("started") + defer logrus.Warn("exited") + + for { + select { + case <-time.After(self.interval): + self.scan() + + case <-self.closeNotify: + return + } + } +} + +func (self *Scanner) scan() { + sessions := self.sessions.sessions.Items() + logrus.Debugf("scanning [%d] sessions", len(sessions)) + + var idleSessionIds []string + for sessionId, ft := range sessions { + if time.Since(ft.(*forwardTable).last) > self.timeout { + idleSessionIds = append(idleSessionIds, sessionId) + logrus.Warnf("[s/%s] idle after [%s]", sessionId, self.timeout) + } + } + + if len(idleSessionIds) > 0 { + logrus.Debugf("found [%d] idle sessions, confirming with controller", len(idleSessionIds)) + + if self.ctrl != nil { + confirm := &ctrl_pb.SessionConfirmation{SessionIds: idleSessionIds} + body, err := proto.Marshal(confirm) + if err == nil { + msg := channel2.NewMessage(ctrl_msg.SessionConfirmationType, body) + if err := self.ctrl.Send(msg); err == nil { + logrus.Warnf("sent confirmation for [%d] sessions", len(idleSessionIds)) + } else { + logrus.Errorf("error sending confirmation request (%v)", err) + } + } + } else { + logrus.Errorf("no ctrl channel, cannot request session confirmations") + } + } +} diff --git a/router/forwarder/tables.go b/router/forwarder/tables.go index d7a538dc7..1c71771ce 100644 --- a/router/forwarder/tables.go +++ b/router/forwarder/tables.go @@ -21,6 +21,7 @@ import ( "github.com/openziti/fabric/router/xgress" "github.com/orcaman/concurrent-map" "reflect" + "time" ) // sessionTable implements a directory of forwardTables, keyed by sessionId. @@ -36,11 +37,13 @@ func newSessionTable() *sessionTable { } func (st *sessionTable) setForwardTable(sessionId string, ft *forwardTable) { + ft.last = time.Now() st.sessions.Set(sessionId, ft) } func (st *sessionTable) getForwardTable(sessionId string) (*forwardTable, bool) { if ft, found := st.sessions.Get(sessionId); found { + ft.(*forwardTable).last = time.Now() return ft.(*forwardTable), true } return nil, false @@ -63,6 +66,7 @@ func (st *sessionTable) debug() string { // forwardTable implements a directory of destinations, keyed by source address. // type forwardTable struct { + last time.Time destinations cmap.ConcurrentMap // map[string]string } diff --git a/router/handler_ctrl/route.go b/router/handler_ctrl/route.go index 1c75a96a9..390594f69 100644 --- a/router/handler_ctrl/route.go +++ b/router/handler_ctrl/route.go @@ -29,6 +29,7 @@ import ( "github.com/openziti/foundation/identity/identity" "github.com/pkg/errors" "github.com/sirupsen/logrus" + "time" ) type routeHandler struct { @@ -116,8 +117,7 @@ func (rh *routeHandler) fail(msg *channel2.Message, attempt int, ch channel2.Cha func (rh *routeHandler) connectEgress(msg *channel2.Message, attempt int, ch channel2.Channel, route *ctrl_pb.Route) { rh.pool.Queue(func() { log := pfxlog.Logger().WithField("sessionId", route.SessionId) - log.Debugf("route request received. binding: %v, destination: %v, address: %v", - route.Egress.Binding, route.Egress.Destination, route.Egress.Address) + log.Debugf("route request received. binding: %v, destination: %v, address: %v", route.Egress.Binding, route.Egress.Destination, route.Egress.Address) if factory, err := xgress.GlobalRegistry().Factory(route.Egress.Binding); err == nil { if dialer, err := factory.CreateDialer(rh.dialerCfg[route.Egress.Binding]); err == nil { sessionId := &identity.TokenId{Token: route.SessionId, Data: route.Egress.PeerData} @@ -127,6 +127,11 @@ func (rh *routeHandler) connectEgress(msg *channel2.Message, attempt int, ch cha handler_xgress.NewCloseHandler(rh.ctrl, rh.forwarder), rh.forwarder) + if rh.forwarder.Options.XgressDialDwellTime > 0 { + logrus.Infof("dwelling [%s] on dial", rh.forwarder.Options.XgressDialDwellTime) + time.Sleep(rh.forwarder.Options.XgressDialDwellTime) + } + if peerData, err := dialer.Dial(route.Egress.Destination, sessionId, xgress.Address(route.Egress.Address), diff --git a/router/router.go b/router/router.go index c05a202d0..8093f6ec2 100644 --- a/router/router.go +++ b/router/router.go @@ -58,6 +58,7 @@ type Router struct { linkOptions *channel2.Options linkListener channel2.UnderlayListener faulter *forwarder.Faulter + scanner *forwarder.Scanner forwarder *forwarder.Forwarder xctrls []xctrl.Xctrl xctrlDone chan struct{} @@ -93,7 +94,8 @@ func Create(config *Config, versionProvider common.VersionProvider) *Router { xgress.InitMetrics(metricsRegistry) faulter := forwarder.NewFaulter(config.Forwarder.FaultTxInterval, closeNotify) - fwd := forwarder.NewForwarder(metricsRegistry, faulter, config.Forwarder, closeNotify) + scanner := forwarder.NewScanner(config.Forwarder, closeNotify) + fwd := forwarder.NewForwarder(metricsRegistry, faulter, scanner, config.Forwarder, closeNotify) xgress.InitPayloadIngester(closeNotify) xgress.InitAcker(fwd, metricsRegistry, closeNotify) @@ -102,6 +104,7 @@ func Create(config *Config, versionProvider common.VersionProvider) *Router { return &Router{ config: config, faulter: faulter, + scanner: scanner, forwarder: fwd, metricsRegistry: metricsRegistry, shutdownC: closeNotify, @@ -334,6 +337,7 @@ func (self *Router) startControlPlane() error { self.ctrl = ch self.faulter.SetCtrl(ch) + self.scanner.SetCtrl(ch) self.xctrlDone = make(chan struct{}) for _, x := range self.xctrls {