diff --git a/controller/handler_ctrl/session_request.go b/controller/handler_ctrl/session_request.go index 117d91819..6a2ad6f82 100644 --- a/controller/handler_ctrl/session_request.go +++ b/controller/handler_ctrl/session_request.go @@ -52,7 +52,7 @@ func (h *sessionRequestHandler) HandleReceive(msg *channel2.Message, ch channel2 go func() { id := &identity.TokenId{Token: request.IngressId, Data: request.PeerData} if session, err := h.network.CreateSession(h.r, id, request.ServiceId); err == nil { - responseMsg := ctrl_msg.NewSessionSuccessMsg(session.Id.Token, session.Circuit.IngressId) + responseMsg := ctrl_msg.NewSessionSuccessMsg(session.Id.Token, session.Path.IngressId) responseMsg.ReplyTo(msg) //static terminator peer data diff --git a/controller/handler_mgmt/list_sessions.go b/controller/handler_mgmt/list_sessions.go index e7747aed4..bd6a897ad 100644 --- a/controller/handler_mgmt/list_sessions.go +++ b/controller/handler_mgmt/list_sessions.go @@ -53,7 +53,7 @@ func (h *listSessionsHandler) HandleReceive(msg *channel2.Message, ch channel2.C Id: s.Id.Token, ClientId: s.ClientId.Token, ServiceId: s.Service.Id, - Circuit: NewCircuit(s.Circuit), + Path: NewPath(s.Path), } response.Sessions = append(response.Sessions, responseSession) } @@ -70,13 +70,13 @@ func (h *listSessionsHandler) HandleReceive(msg *channel2.Message, ch channel2.C } } -func NewCircuit(circuit *network.Circuit) *mgmt_pb.Circuit { - mgmtCircuit := &mgmt_pb.Circuit{} - for _, r := range circuit.Path { - mgmtCircuit.Path = append(mgmtCircuit.Path, r.Id) +func NewPath(path *network.Path) *mgmt_pb.Path { + mgmtPath := &mgmt_pb.Path{} + for _, r := range path.Nodes { + mgmtPath.Nodes = append(mgmtPath.Nodes, r.Id) } - for _, l := range circuit.Links { - mgmtCircuit.Links = append(mgmtCircuit.Links, l.Id.Token) + for _, l := range path.Links { + mgmtPath.Links = append(mgmtPath.Links, l.Id.Token) } - return mgmtCircuit + return mgmtPath } diff --git a/controller/handler_mgmt/stream_sessions.go b/controller/handler_mgmt/stream_sessions.go index f41a5b84e..c6166fae6 100644 --- a/controller/handler_mgmt/stream_sessions.go +++ b/controller/handler_mgmt/stream_sessions.go @@ -62,13 +62,13 @@ type SessionsStreamHandler struct { ch channel2.Channel } -func (handler *SessionsStreamHandler) SessionCreated(sessionId *identity.TokenId, clientId *identity.TokenId, serviceId string, circuit *network.Circuit) { +func (handler *SessionsStreamHandler) SessionCreated(sessionId *identity.TokenId, clientId *identity.TokenId, serviceId string, path *network.Path) { event := &mgmt_pb.StreamSessionsEvent{ EventType: mgmt_pb.StreamSessionEventType_SessionCreated, SessionId: sessionId.Token, ClientId: clientId.Token, ServiceId: serviceId, - Circuit: NewCircuit(circuit), + Path: NewPath(path), } handler.sendEvent(event) } @@ -82,11 +82,11 @@ func (handler *SessionsStreamHandler) SessionDeleted(sessionId *identity.TokenId handler.sendEvent(event) } -func (handler *SessionsStreamHandler) CircuitUpdated(sessionId *identity.TokenId, circuit *network.Circuit) { +func (handler *SessionsStreamHandler) PathUpdated(sessionId *identity.TokenId, path *network.Path) { event := &mgmt_pb.StreamSessionsEvent{ - EventType: mgmt_pb.StreamSessionEventType_CircuitUpdated, + EventType: mgmt_pb.StreamSessionEventType_PathUpdated, SessionId: sessionId.Token, - Circuit: NewCircuit(circuit), + Path: NewPath(path), } handler.sendEvent(event) } diff --git a/controller/network/circuit.go b/controller/network/circuit.go deleted file mode 100644 index 0c4d1f4eb..000000000 --- a/controller/network/circuit.go +++ /dev/null @@ -1,155 +0,0 @@ -/* - Copyright NetFoundry, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package network - -import ( - "fmt" - "github.com/openziti/fabric/pb/ctrl_pb" - "github.com/openziti/foundation/identity/identity" -) - -type Circuit struct { - Path []*Router - Links []*Link - Binding string - IngressId string - EgressId string -} - -func (circuit *Circuit) String() string { - if len(circuit.Path) < 1 { - return "{}" - } - if len(circuit.Links) != len(circuit.Path)-1 { - return "{malformed}" - } - out := fmt.Sprintf("[r/%s]", circuit.Path[0].Id) - for i := 0; i < len(circuit.Links); i++ { - out += fmt.Sprintf("->[l/%s]", circuit.Links[i].Id.Token) - out += fmt.Sprintf("->[r/%s]", circuit.Path[i+1].Id) - } - return out -} - -func (circuit *Circuit) EqualPath(other *Circuit) bool { - if len(circuit.Path) != len(other.Path) { - return false - } - if len(circuit.Links) != len(other.Links) { - return false - } - for i := 0; i < len(circuit.Path); i++ { - if circuit.Path[i] != other.Path[i] { - return false - } - } - for i := 0; i < len(circuit.Links); i++ { - if circuit.Links[i] != other.Links[i] { - return false - } - } - return true -} - -func (circuit *Circuit) EgressRouter() *Router { - if len(circuit.Path) > 0 { - return circuit.Path[len(circuit.Path)-1] - } - return nil -} - -func (circuit *Circuit) CreateRouteMessages(attempt uint32, sessionId *identity.TokenId, egressAddress string) ([]*ctrl_pb.Route, error) { - var routeMessages []*ctrl_pb.Route - if len(circuit.Links) == 0 { - // single router path - routeMessage := &ctrl_pb.Route{SessionId: sessionId.Token, Attempt: attempt} - routeMessage.Forwards = append(routeMessage.Forwards, &ctrl_pb.Route_Forward{ - SrcAddress: circuit.IngressId, - DstAddress: circuit.EgressId, - }) - routeMessage.Forwards = append(routeMessage.Forwards, &ctrl_pb.Route_Forward{ - SrcAddress: circuit.EgressId, - DstAddress: circuit.IngressId, - }) - routeMessage.Egress = &ctrl_pb.Route_Egress{ - Binding: circuit.Binding, - Address: circuit.EgressId, - Destination: egressAddress, - } - routeMessages = append(routeMessages, routeMessage) - } - - for i, link := range circuit.Links { - if i == 0 { - // ingress - routeMessage := &ctrl_pb.Route{SessionId: sessionId.Token, Attempt: attempt} - routeMessage.Forwards = append(routeMessage.Forwards, &ctrl_pb.Route_Forward{ - SrcAddress: circuit.IngressId, - DstAddress: link.Id.Token, - }) - routeMessage.Forwards = append(routeMessage.Forwards, &ctrl_pb.Route_Forward{ - SrcAddress: link.Id.Token, - DstAddress: circuit.IngressId, - }) - routeMessages = append(routeMessages, routeMessage) - } - if i >= 0 && i < len(circuit.Links)-1 { - // transit - nextLink := circuit.Links[i+1] - routeMessage := &ctrl_pb.Route{SessionId: sessionId.Token, Attempt: attempt} - routeMessage.Forwards = append(routeMessage.Forwards, &ctrl_pb.Route_Forward{ - SrcAddress: link.Id.Token, - DstAddress: nextLink.Id.Token, - }) - routeMessage.Forwards = append(routeMessage.Forwards, &ctrl_pb.Route_Forward{ - SrcAddress: nextLink.Id.Token, - DstAddress: link.Id.Token, - }) - routeMessages = append(routeMessages, routeMessage) - } - if i == len(circuit.Links)-1 { - // egress - routeMessage := &ctrl_pb.Route{SessionId: sessionId.Token, Attempt: attempt} - routeMessage.Egress = &ctrl_pb.Route_Egress{ - Binding: circuit.Binding, - Address: circuit.EgressId, - Destination: egressAddress, - } - routeMessage.Forwards = append(routeMessage.Forwards, &ctrl_pb.Route_Forward{ - SrcAddress: circuit.EgressId, - DstAddress: link.Id.Token, - }) - routeMessage.Forwards = append(routeMessage.Forwards, &ctrl_pb.Route_Forward{ - SrcAddress: link.Id.Token, - DstAddress: circuit.EgressId, - }) - routeMessages = append(routeMessages, routeMessage) - } - } - return routeMessages, nil -} - -func (circuit *Circuit) usesLink(l *Link) bool { - if circuit.Links != nil { - for _, o := range circuit.Links { - if o == l { - return true - } - } - } - return false -} diff --git a/controller/network/circuit_test.go b/controller/network/circuit_test.go deleted file mode 100644 index a254313fa..000000000 --- a/controller/network/circuit_test.go +++ /dev/null @@ -1,231 +0,0 @@ -/* - Copyright NetFoundry, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package network - -import ( - "github.com/openziti/fabric/controller/db" - "github.com/openziti/fabric/controller/models" - "github.com/openziti/foundation/channel2" - "github.com/openziti/foundation/common" - "github.com/openziti/foundation/identity/identity" - "github.com/openziti/foundation/transport" - "github.com/openziti/foundation/transport/tcp" - "github.com/stretchr/testify/assert" - "runtime" - "testing" - "time" -) - -func TestSimpleCircuit2(t *testing.T) { - ctx := db.NewTestContext(t) - defer ctx.Cleanup() - - closeNotify := make(chan struct{}) - defer close(closeNotify) - - nodeId := &identity.TokenId{Token: "test"} - network, err := NewNetwork(nodeId, nil, ctx.GetDb(), nil, NewVersionProviderTest(), closeNotify) - assert.Nil(t, err) - - addr := "tcp:0.0.0.0:0" - transportAddr, err := tcp.AddressParser{}.Parse(addr) - assert.Nil(t, err) - - r0 := newRouterForTest("r0", "", transportAddr, nil) - network.Routers.markConnected(r0) - - r1 := newRouterForTest("r1", "", transportAddr, nil) - network.Routers.markConnected(r1) - - l0 := newLink(&identity.TokenId{Token: "l0"}) - l0.Src = r0 - l0.Dst = r1 - l0.addState(newLinkState(Connected)) - network.linkController.add(l0) - - circuit, err := network.CreateCircuit(r0, r1) - assert.NotNil(t, circuit) - assert.Nil(t, err) - assert.Equal(t, 2, len(circuit.Path)) - assert.Equal(t, r0, circuit.Path[0]) - assert.Equal(t, r1, circuit.Path[1]) - assert.Equal(t, 1, len(circuit.Links)) - assert.Equal(t, l0, circuit.Links[0]) - assert.Equal(t, r1, circuit.EgressRouter()) - - s0 := &identity.TokenId{Token: "s0"} - routeMessages, err := circuit.CreateRouteMessages(0, s0, addr) - assert.NotNil(t, routeMessages) - assert.Nil(t, err) - assert.Equal(t, 2, len(routeMessages)) - - // ingress route message - rm0 := routeMessages[0] - assert.Equal(t, s0.Token, rm0.SessionId) - assert.Nil(t, rm0.Egress) - assert.Equal(t, 2, len(rm0.Forwards)) - assert.Equal(t, circuit.IngressId, rm0.Forwards[0].SrcAddress) - assert.Equal(t, l0.Id.Token, rm0.Forwards[0].DstAddress) - assert.Equal(t, l0.Id.Token, rm0.Forwards[1].SrcAddress) - assert.Equal(t, circuit.IngressId, rm0.Forwards[1].DstAddress) - - // egress route message - rm1 := routeMessages[1] - assert.Equal(t, s0.Token, rm1.SessionId) - assert.NotNil(t, rm1.Egress) - assert.Equal(t, circuit.EgressId, rm1.Egress.Address) - assert.Equal(t, addr, rm1.Egress.Destination) - assert.Equal(t, circuit.EgressId, rm1.Forwards[0].SrcAddress) - assert.Equal(t, l0.Id.Token, rm1.Forwards[0].DstAddress) - assert.Equal(t, l0.Id.Token, rm1.Forwards[1].SrcAddress) - assert.Equal(t, circuit.EgressId, rm1.Forwards[1].DstAddress) -} - -func TestTransitCircuit2(t *testing.T) { - ctx := db.NewTestContext(t) - defer ctx.Cleanup() - - closeNotify := make(chan struct{}) - defer close(closeNotify) - - nodeId := &identity.TokenId{Token: "test"} - network, err := NewNetwork(nodeId, nil, ctx.GetDb(), nil, NewVersionProviderTest(), closeNotify) - assert.Nil(t, err) - - addr := "tcp:0.0.0.0:0" - transportAddr, err := tcp.AddressParser{}.Parse(addr) - assert.Nil(t, err) - - r0 := newRouterForTest("r0", "", transportAddr, nil) - network.Routers.markConnected(r0) - - r1 := newRouterForTest("r1", "", transportAddr, nil) - network.Routers.markConnected(r1) - - r2 := newRouterForTest("r2", "", transportAddr, nil) - network.Routers.markConnected(r2) - - l0 := newLink(&identity.TokenId{Token: "l0"}) - l0.Src = r0 - l0.Dst = r1 - l0.addState(newLinkState(Connected)) - network.linkController.add(l0) - - l1 := newLink(&identity.TokenId{Token: "l1"}) - l1.Src = r1 - l1.Dst = r2 - l1.addState(newLinkState(Connected)) - network.linkController.add(l1) - - circuit, err := network.CreateCircuit(r0, r2) - assert.NotNil(t, circuit) - assert.Nil(t, err) - assert.Equal(t, 3, len(circuit.Path)) - assert.Equal(t, r0, circuit.Path[0]) - assert.Equal(t, r1, circuit.Path[1]) - assert.Equal(t, r2, circuit.Path[2]) - assert.Equal(t, 2, len(circuit.Links)) - assert.Equal(t, l0, circuit.Links[0]) - assert.Equal(t, l1, circuit.Links[1]) - assert.Equal(t, r2, circuit.EgressRouter()) - - s0 := &identity.TokenId{Token: "s0"} - routeMessages, err := circuit.CreateRouteMessages(0, s0, addr) - assert.NotNil(t, routeMessages) - assert.Nil(t, err) - assert.Equal(t, 3, len(routeMessages)) - - // ingress route message - rm0 := routeMessages[0] - assert.Equal(t, s0.Token, rm0.SessionId) - assert.Nil(t, rm0.Egress) - assert.Equal(t, 2, len(rm0.Forwards)) - assert.Equal(t, circuit.IngressId, rm0.Forwards[0].SrcAddress) - assert.Equal(t, l0.Id.Token, rm0.Forwards[0].DstAddress) - assert.Equal(t, l0.Id.Token, rm0.Forwards[1].SrcAddress) - assert.Equal(t, circuit.IngressId, rm0.Forwards[1].DstAddress) - - // transit route message - rm1 := routeMessages[1] - assert.Equal(t, s0.Token, rm1.SessionId) - assert.Nil(t, rm1.Egress) - assert.Equal(t, 2, len(rm1.Forwards)) - assert.Equal(t, l0.Id.Token, rm1.Forwards[0].SrcAddress) - assert.Equal(t, l1.Id.Token, rm1.Forwards[0].DstAddress) - assert.Equal(t, l1.Id.Token, rm1.Forwards[1].SrcAddress) - assert.Equal(t, l0.Id.Token, rm1.Forwards[1].DstAddress) - - // egress route message - rm2 := routeMessages[2] - assert.Equal(t, s0.Token, rm2.SessionId) - assert.NotNil(t, rm2.Egress) - assert.Equal(t, circuit.EgressId, rm2.Egress.Address) - assert.Equal(t, transportAddr.String(), rm2.Egress.Destination) - assert.Equal(t, circuit.EgressId, rm2.Forwards[0].SrcAddress) - assert.Equal(t, l1.Id.Token, rm2.Forwards[0].DstAddress) - assert.Equal(t, l1.Id.Token, rm2.Forwards[1].SrcAddress) - assert.Equal(t, circuit.EgressId, rm2.Forwards[1].DstAddress) -} - -func newRouterForTest(id string, fingerprint string, advLstnr transport.Address, ctrl channel2.Channel) *Router { - r := &Router{ - BaseEntity: models.BaseEntity{Id: id}, - Fingerprint: &fingerprint, - Control: ctrl, - } - if advLstnr != nil { - r.AdvertisedListener = advLstnr.String() - } - return r -} - -type VersionProviderTest struct { -} - -func (v VersionProviderTest) Branch() string { - return "local" -} - -func (v VersionProviderTest) EncoderDecoder() common.VersionEncDec { - return &common.StdVersionEncDec -} - -func (v VersionProviderTest) Version() string { - return "v0.0.0" -} - -func (v VersionProviderTest) BuildDate() string { - return time.Now().String() -} - -func (v VersionProviderTest) Revision() string { - return "" -} - -func (v VersionProviderTest) AsVersionInfo() *common.VersionInfo { - return &common.VersionInfo{ - Version: v.Version(), - Revision: v.Revision(), - BuildDate: v.BuildDate(), - OS: runtime.GOOS, - Arch: runtime.GOARCH, - } -} - -func NewVersionProviderTest() common.VersionProvider { - return &VersionProviderTest{} -} diff --git a/controller/network/network.go b/controller/network/network.go index af08b09bc..ba2bb5c43 100644 --- a/controller/network/network.go +++ b/controller/network/network.go @@ -348,29 +348,21 @@ func (network *Network) CreateSession(srcR *Router, clientId *identity.TokenId, } // 3: select terminator - strategy, terminator, path, err := network.selectPath(srcR, svc, targetIdentity) + strategy, terminator, pathNodes, err := network.selectPath(srcR, svc, targetIdentity) if err != nil { network.ServiceDialOtherError(serviceId) return nil, err } - // 4: Create Circuit - circuit, err := network.CreateCircuitWithPath(path) + // 4: Create Path + path, err := network.CreatePathWithNodes(pathNodes) if err != nil { network.ServiceDialOtherError(serviceId) return nil, err } - circuit.Binding = "transport" - if terminator.GetBinding() != "" { - circuit.Binding = terminator.GetBinding() - } else if strings.HasPrefix(terminator.GetBinding(), "hosted") { - circuit.Binding = "edge" - } else if strings.HasPrefix(terminator.GetAddress(), "udp") { - circuit.Binding = "udp" - } // 4a: Create Route Messages - rms, err := circuit.CreateRouteMessages(attempt, sessionId, terminator.GetAddress()) + rms, err := path.CreateRouteMessages(attempt, sessionId, terminator) if err != nil { network.ServiceDialOtherError(serviceId) return nil, err @@ -379,7 +371,7 @@ func (network *Network) CreateSession(srcR *Router, clientId *identity.TokenId, // 5: Routing logrus.Debugf("route attempt [#%d] for [s/%s]", attempt+1, sessionId.Token) - peerData, cleanups, err := rs.route(attempt, circuit, rms, strategy, terminator) + peerData, cleanups, err := rs.route(attempt, path, rms, strategy, terminator) for k, v := range cleanups { allCleanups[k] = v } @@ -392,7 +384,7 @@ func (network *Network) CreateSession(srcR *Router, clientId *identity.TokenId, } else { // revert successful routes logrus.Warnf("session creation failed after [%d] attempts, sending cleanup unroutes for [s/%s]", network.options.CreateSessionRetries, sessionId.Token) - for cleanupRId, _ := range allCleanups { + for cleanupRId := range allCleanups { if r, err := network.GetRouter(cleanupRId); err == nil { if err := sendUnroute(r, sessionId, true); err == nil { logrus.Debugf("sent cleanup unroute for [s/%s] to [r/%s]", sessionId.Token, r.Id) @@ -410,11 +402,11 @@ func (network *Network) CreateSession(srcR *Router, clientId *identity.TokenId, // 5.a: Unroute Abandoned Routers (from Previous Attempts) usedRouters := make(map[string]struct{}) - for _, r := range circuit.Path { + for _, r := range path.Nodes { usedRouters[r.Id] = struct{}{} } cleanupCount := 0 - for cleanupRId, _ := range allCleanups { + for cleanupRId := range allCleanups { if _, found := usedRouters[cleanupRId]; !found { cleanupCount++ if r, err := network.GetRouter(cleanupRId); err == nil { @@ -435,14 +427,14 @@ func (network *Network) CreateSession(srcR *Router, clientId *identity.TokenId, Id: sessionId, ClientId: clientId, Service: svc, - Circuit: circuit, + Path: path, Terminator: terminator, PeerData: peerData, } network.sessionController.add(ss) - network.SessionCreated(ss.Id, ss.ClientId, ss.Service.Id, ss.Circuit) + network.SessionCreated(ss.Id, ss.ClientId, ss.Service.Id, ss.Path) - logrus.Debugf("created session [s/%s] ==> %s", sessionId.Token, ss.Circuit) + logrus.Debugf("created session [s/%s] ==> %s", sessionId.Token, ss.Path) return ss, nil } } @@ -456,9 +448,9 @@ func parseIdentityAndService(service string) (string, string) { if atIndex < 0 { return "", service } - identity := service[0:atIndex] + identityId := service[0:atIndex] serviceId := service[atIndex+1:] - return identity, serviceId + return identityId, serviceId } func (network *Network) selectPath(srcR *Router, svc *Service, identity string) (xt.Strategy, xt.Terminator, []*Router, error) { @@ -557,7 +549,7 @@ func (network *Network) RemoveSession(sessionId *identity.TokenId, now bool) err log := pfxlog.Logger() if ss, found := network.sessionController.get(sessionId); found { - for _, r := range ss.Circuit.Path { + for _, r := range ss.Path.Nodes { err := sendUnroute(r, ss.Id, now) if err != nil { log.Errorf("error sending unroute to [r/%s] (%s)", r.Id, err) @@ -579,7 +571,7 @@ func (network *Network) RemoveSession(sessionId *identity.TokenId, now bool) err return InvalidSessionError{sessionId: sessionId.Token} } -func (network *Network) CreateCircuit(srcR, dstR *Router) (*Circuit, error) { +func (network *Network) CreatePath(srcR, dstR *Router) (*Path, error) { ingressId, err := network.sequence.NextHash() if err != nil { return nil, err @@ -590,19 +582,19 @@ func (network *Network) CreateCircuit(srcR, dstR *Router) (*Circuit, error) { return nil, err } - circuit := &Circuit{ + path := &Path{ Links: make([]*Link, 0), IngressId: ingressId, EgressId: egressId, - Path: make([]*Router, 0), + Nodes: make([]*Router, 0), } - circuit.Path = append(circuit.Path, srcR) - circuit.Path = append(circuit.Path, dstR) + path.Nodes = append(path.Nodes, srcR) + path.Nodes = append(path.Nodes, dstR) - return network.UpdateCircuit(circuit) + return network.UpdatePath(path) } -func (network *Network) CreateCircuitWithPath(path []*Router) (*Circuit, error) { +func (network *Network) CreatePathWithNodes(nodes []*Router) (*Path, error) { ingressId, err := network.sequence.NextHash() if err != nil { return nil, err @@ -613,44 +605,43 @@ func (network *Network) CreateCircuitWithPath(path []*Router) (*Circuit, error) return nil, err } - circuit := &Circuit{ - Path: path, + path := &Path{ + Nodes: nodes, IngressId: ingressId, EgressId: egressId, } - if err := network.setLinks(circuit); err != nil { + if err := network.setLinks(path); err != nil { return nil, err } - return circuit, nil + return path, nil } -func (network *Network) UpdateCircuit(circuit *Circuit) (*Circuit, error) { - srcR := circuit.Path[0] - dstR := circuit.Path[len(circuit.Path)-1] - path, _, err := network.shortestPath(srcR, dstR) +func (network *Network) UpdatePath(path *Path) (*Path, error) { + srcR := path.Nodes[0] + dstR := path.Nodes[len(path.Nodes)-1] + nodes, _, err := network.shortestPath(srcR, dstR) if err != nil { return nil, err } - circuit2 := &Circuit{ - Path: path, - Binding: circuit.Binding, - IngressId: circuit.IngressId, - EgressId: circuit.EgressId, + path2 := &Path{ + Nodes: nodes, + IngressId: path.IngressId, + EgressId: path.EgressId, } - if err := network.setLinks(circuit2); err != nil { + if err := network.setLinks(path2); err != nil { return nil, err } - return circuit2, nil + return path2, nil } -func (network *Network) setLinks(circuit *Circuit) error { - if len(circuit.Path) > 1 { - for i := 0; i < len(circuit.Path)-1; i++ { - if link, found := network.linkController.leastExpensiveLink(circuit.Path[i], circuit.Path[i+1]); found { - circuit.Links = append(circuit.Links, link) +func (network *Network) setLinks(path *Path) error { + if len(path.Nodes) > 1 { + for i := 0; i < len(path.Nodes)-1; i++ { + if link, found := network.linkController.leastExpensiveLink(path.Nodes[i], path.Nodes[i+1]); found { + path.Links = append(path.Links, link) } else { - return errors.Errorf("no link from r/%v to r/%v", circuit.Path[i].Id, circuit.Path[i+1].Id) + return errors.Errorf("no link from r/%v to r/%v", path.Nodes[i].Id, path.Nodes[i+1].Id) } } } @@ -720,7 +711,7 @@ func (network *Network) rerouteLink(l *Link) error { sessions := network.sessionController.all() for _, s := range sessions { - if s.Circuit.usesLink(l) { + if s.Path.usesLink(l) { logrus.Infof("session [s/%s] uses link [l/%s]", s.Id.Token, l.Id.Token) if err := network.rerouteSession(s); err != nil { logrus.Errorf("error rerouting session [s/%s], removing", s.Id.Token) @@ -740,24 +731,24 @@ func (network *Network) rerouteSession(s *Session) error { logrus.Warnf("rerouting [s/%s]", s.Id.Token) - if cq, err := network.UpdateCircuit(s.Circuit); err == nil { - s.Circuit = cq + if cq, err := network.UpdatePath(s.Path); err == nil { + s.Path = cq - rms, err := cq.CreateRouteMessages(SmartRerouteAttempt, s.Id, s.Terminator.GetAddress()) + rms, err := cq.CreateRouteMessages(SmartRerouteAttempt, s.Id, s.Terminator) if err != nil { logrus.Errorf("error creating route messages (%s)", err) return err } - for i := 0; i < len(cq.Path); i++ { - if _, err := sendRoute(cq.Path[i], rms[i], network.options.RouteTimeout); err != nil { - logrus.Errorf("error sending route to [r/%s] (%s)", cq.Path[i].Id, err) + for i := 0; i < len(cq.Nodes); i++ { + if _, err := sendRoute(cq.Nodes[i], rms[i], network.options.RouteTimeout); err != nil { + logrus.Errorf("error sending route to [r/%s] (%s)", cq.Nodes[i].Id, err) } } logrus.Infof("rerouted session [s/%s]", s.Id.Token) - network.CircuitUpdated(s.Id, s.Circuit) + network.PathUpdated(s.Id, s.Path) return nil } else { @@ -769,27 +760,27 @@ func (network *Network) rerouteSession(s *Session) error { } } -func (network *Network) smartReroute(s *Session, cq *Circuit) error { +func (network *Network) smartReroute(s *Session, cq *Path) error { if s.Rerouting.CompareAndSwap(false, true) { defer s.Rerouting.Set(false) - s.Circuit = cq + s.Path = cq - rms, err := cq.CreateRouteMessages(SmartRerouteAttempt, s.Id, s.Terminator.GetAddress()) + rms, err := cq.CreateRouteMessages(SmartRerouteAttempt, s.Id, s.Terminator) if err != nil { logrus.Errorf("error creating route messages (%s)", err) return err } - for i := 0; i < len(cq.Path); i++ { - if _, err := sendRoute(cq.Path[i], rms[i], network.options.RouteTimeout); err != nil { - logrus.Errorf("error sending route to [r/%s] (%s)", cq.Path[i].Id, err) + for i := 0; i < len(cq.Nodes); i++ { + if _, err := sendRoute(cq.Nodes[i], rms[i], network.options.RouteTimeout); err != nil { + logrus.Errorf("error sending route to [r/%s] (%s)", cq.Nodes[i].Id, err) } } logrus.Debugf("rerouted session [s/%s]", s.Id.Token) - network.CircuitUpdated(s.Id, s.Circuit) + network.PathUpdated(s.Id, s.Path) return nil diff --git a/controller/network/path.go b/controller/network/path.go index 0e6acf674..d7904c9e3 100644 --- a/controller/network/path.go +++ b/controller/network/path.go @@ -17,11 +17,145 @@ package network import ( - "errors" "fmt" + "github.com/openziti/fabric/controller/xt" + "github.com/openziti/fabric/pb/ctrl_pb" + "github.com/openziti/foundation/identity/identity" + "github.com/pkg/errors" "math" ) +type Path struct { + Nodes []*Router + Links []*Link + IngressId string + EgressId string +} + +func (self *Path) String() string { + if len(self.Nodes) < 1 { + return "{}" + } + if len(self.Links) != len(self.Nodes)-1 { + return "{malformed}" + } + out := fmt.Sprintf("[r/%s]", self.Nodes[0].Id) + for i := 0; i < len(self.Links); i++ { + out += fmt.Sprintf("->[l/%s]", self.Links[i].Id.Token) + out += fmt.Sprintf("->[r/%s]", self.Nodes[i+1].Id) + } + return out +} + +func (self *Path) EqualPath(other *Path) bool { + if len(self.Nodes) != len(other.Nodes) { + return false + } + if len(self.Links) != len(other.Links) { + return false + } + for i := 0; i < len(self.Nodes); i++ { + if self.Nodes[i] != other.Nodes[i] { + return false + } + } + for i := 0; i < len(self.Links); i++ { + if self.Links[i] != other.Links[i] { + return false + } + } + return true +} + +func (self *Path) EgressRouter() *Router { + if len(self.Nodes) > 0 { + return self.Nodes[len(self.Nodes)-1] + } + return nil +} + +func (self *Path) CreateRouteMessages(attempt uint32, sessionId *identity.TokenId, terminator xt.Terminator) ([]*ctrl_pb.Route, error) { + var routeMessages []*ctrl_pb.Route + if len(self.Links) == 0 { + // single router path + routeMessage := &ctrl_pb.Route{SessionId: sessionId.Token, Attempt: attempt} + routeMessage.Forwards = append(routeMessage.Forwards, &ctrl_pb.Route_Forward{ + SrcAddress: self.IngressId, + DstAddress: self.EgressId, + }) + routeMessage.Forwards = append(routeMessage.Forwards, &ctrl_pb.Route_Forward{ + SrcAddress: self.EgressId, + DstAddress: self.IngressId, + }) + routeMessage.Egress = &ctrl_pb.Route_Egress{ + Binding: terminator.GetBinding(), + Address: self.EgressId, + Destination: terminator.GetAddress(), + } + routeMessages = append(routeMessages, routeMessage) + } + + for i, link := range self.Links { + if i == 0 { + // ingress + routeMessage := &ctrl_pb.Route{SessionId: sessionId.Token, Attempt: attempt} + routeMessage.Forwards = append(routeMessage.Forwards, &ctrl_pb.Route_Forward{ + SrcAddress: self.IngressId, + DstAddress: link.Id.Token, + }) + routeMessage.Forwards = append(routeMessage.Forwards, &ctrl_pb.Route_Forward{ + SrcAddress: link.Id.Token, + DstAddress: self.IngressId, + }) + routeMessages = append(routeMessages, routeMessage) + } + if i >= 0 && i < len(self.Links)-1 { + // transit + nextLink := self.Links[i+1] + routeMessage := &ctrl_pb.Route{SessionId: sessionId.Token, Attempt: attempt} + routeMessage.Forwards = append(routeMessage.Forwards, &ctrl_pb.Route_Forward{ + SrcAddress: link.Id.Token, + DstAddress: nextLink.Id.Token, + }) + routeMessage.Forwards = append(routeMessage.Forwards, &ctrl_pb.Route_Forward{ + SrcAddress: nextLink.Id.Token, + DstAddress: link.Id.Token, + }) + routeMessages = append(routeMessages, routeMessage) + } + if i == len(self.Links)-1 { + // egress + routeMessage := &ctrl_pb.Route{SessionId: sessionId.Token, Attempt: attempt} + routeMessage.Egress = &ctrl_pb.Route_Egress{ + Binding: terminator.GetBinding(), + Address: self.EgressId, + Destination: terminator.GetAddress(), + } + routeMessage.Forwards = append(routeMessage.Forwards, &ctrl_pb.Route_Forward{ + SrcAddress: self.EgressId, + DstAddress: link.Id.Token, + }) + routeMessage.Forwards = append(routeMessage.Forwards, &ctrl_pb.Route_Forward{ + SrcAddress: link.Id.Token, + DstAddress: self.EgressId, + }) + routeMessages = append(routeMessages, routeMessage) + } + } + return routeMessages, nil +} + +func (self *Path) usesLink(l *Link) bool { + if self.Links != nil { + for _, o := range self.Links { + if o == l { + return true + } + } + } + return false +} + func (network *Network) shortestPath(srcR *Router, dstR *Router) ([]*Router, int64, error) { if srcR == nil || dstR == nil { return nil, 0, errors.New("not routable (!srcR||!dstR)") diff --git a/controller/network/path_test.go b/controller/network/path_test.go index 5811b8375..acd31cd76 100644 --- a/controller/network/path_test.go +++ b/controller/network/path_test.go @@ -18,12 +18,220 @@ package network import ( "github.com/openziti/fabric/controller/db" + "github.com/openziti/fabric/controller/models" + "github.com/openziti/foundation/channel2" + "github.com/openziti/foundation/common" "github.com/openziti/foundation/identity/identity" + "github.com/openziti/foundation/transport" "github.com/openziti/foundation/transport/tcp" "github.com/stretchr/testify/assert" + "runtime" "testing" + "time" ) +func TestSimplePath2(t *testing.T) { + ctx := db.NewTestContext(t) + defer ctx.Cleanup() + + closeNotify := make(chan struct{}) + defer close(closeNotify) + + nodeId := &identity.TokenId{Token: "test"} + network, err := NewNetwork(nodeId, nil, ctx.GetDb(), nil, NewVersionProviderTest(), closeNotify) + assert.Nil(t, err) + + addr := "tcp:0.0.0.0:0" + transportAddr, err := tcp.AddressParser{}.Parse(addr) + assert.Nil(t, err) + + r0 := newRouterForTest("r0", "", transportAddr, nil) + network.Routers.markConnected(r0) + + r1 := newRouterForTest("r1", "", transportAddr, nil) + network.Routers.markConnected(r1) + + l0 := newLink(&identity.TokenId{Token: "l0"}) + l0.Src = r0 + l0.Dst = r1 + l0.addState(newLinkState(Connected)) + network.linkController.add(l0) + + path, err := network.CreatePath(r0, r1) + assert.NotNil(t, path) + assert.Nil(t, err) + assert.Equal(t, 2, len(path.Nodes)) + assert.Equal(t, r0, path.Nodes[0]) + assert.Equal(t, r1, path.Nodes[1]) + assert.Equal(t, 1, len(path.Links)) + assert.Equal(t, l0, path.Links[0]) + assert.Equal(t, r1, path.EgressRouter()) + + s0 := &identity.TokenId{Token: "s0"} + terminator := &Terminator{Address: addr, Binding: "transport"} + routeMessages, err := path.CreateRouteMessages(0, s0, terminator) + assert.NotNil(t, routeMessages) + assert.Nil(t, err) + assert.Equal(t, 2, len(routeMessages)) + + // ingress route message + rm0 := routeMessages[0] + assert.Equal(t, s0.Token, rm0.SessionId) + assert.Nil(t, rm0.Egress) + assert.Equal(t, 2, len(rm0.Forwards)) + assert.Equal(t, path.IngressId, rm0.Forwards[0].SrcAddress) + assert.Equal(t, l0.Id.Token, rm0.Forwards[0].DstAddress) + assert.Equal(t, l0.Id.Token, rm0.Forwards[1].SrcAddress) + assert.Equal(t, path.IngressId, rm0.Forwards[1].DstAddress) + + // egress route message + rm1 := routeMessages[1] + assert.Equal(t, s0.Token, rm1.SessionId) + assert.NotNil(t, rm1.Egress) + assert.Equal(t, path.EgressId, rm1.Egress.Address) + assert.Equal(t, addr, rm1.Egress.Destination) + assert.Equal(t, path.EgressId, rm1.Forwards[0].SrcAddress) + assert.Equal(t, l0.Id.Token, rm1.Forwards[0].DstAddress) + assert.Equal(t, l0.Id.Token, rm1.Forwards[1].SrcAddress) + assert.Equal(t, path.EgressId, rm1.Forwards[1].DstAddress) +} + +func TestTransitPath2(t *testing.T) { + ctx := db.NewTestContext(t) + defer ctx.Cleanup() + + closeNotify := make(chan struct{}) + defer close(closeNotify) + + nodeId := &identity.TokenId{Token: "test"} + network, err := NewNetwork(nodeId, nil, ctx.GetDb(), nil, NewVersionProviderTest(), closeNotify) + assert.Nil(t, err) + + addr := "tcp:0.0.0.0:0" + transportAddr, err := tcp.AddressParser{}.Parse(addr) + assert.Nil(t, err) + + r0 := newRouterForTest("r0", "", transportAddr, nil) + network.Routers.markConnected(r0) + + r1 := newRouterForTest("r1", "", transportAddr, nil) + network.Routers.markConnected(r1) + + r2 := newRouterForTest("r2", "", transportAddr, nil) + network.Routers.markConnected(r2) + + l0 := newLink(&identity.TokenId{Token: "l0"}) + l0.Src = r0 + l0.Dst = r1 + l0.addState(newLinkState(Connected)) + network.linkController.add(l0) + + l1 := newLink(&identity.TokenId{Token: "l1"}) + l1.Src = r1 + l1.Dst = r2 + l1.addState(newLinkState(Connected)) + network.linkController.add(l1) + + path, err := network.CreatePath(r0, r2) + assert.NotNil(t, path) + assert.Nil(t, err) + assert.Equal(t, 3, len(path.Nodes)) + assert.Equal(t, r0, path.Nodes[0]) + assert.Equal(t, r1, path.Nodes[1]) + assert.Equal(t, r2, path.Nodes[2]) + assert.Equal(t, 2, len(path.Links)) + assert.Equal(t, l0, path.Links[0]) + assert.Equal(t, l1, path.Links[1]) + assert.Equal(t, r2, path.EgressRouter()) + + s0 := &identity.TokenId{Token: "s0"} + terminator := &Terminator{Address: addr, Binding: "transport"} + routeMessages, err := path.CreateRouteMessages(0, s0, terminator) + assert.NotNil(t, routeMessages) + assert.Nil(t, err) + assert.Equal(t, 3, len(routeMessages)) + + // ingress route message + rm0 := routeMessages[0] + assert.Equal(t, s0.Token, rm0.SessionId) + assert.Nil(t, rm0.Egress) + assert.Equal(t, 2, len(rm0.Forwards)) + assert.Equal(t, path.IngressId, rm0.Forwards[0].SrcAddress) + assert.Equal(t, l0.Id.Token, rm0.Forwards[0].DstAddress) + assert.Equal(t, l0.Id.Token, rm0.Forwards[1].SrcAddress) + assert.Equal(t, path.IngressId, rm0.Forwards[1].DstAddress) + + // transit route message + rm1 := routeMessages[1] + assert.Equal(t, s0.Token, rm1.SessionId) + assert.Nil(t, rm1.Egress) + assert.Equal(t, 2, len(rm1.Forwards)) + assert.Equal(t, l0.Id.Token, rm1.Forwards[0].SrcAddress) + assert.Equal(t, l1.Id.Token, rm1.Forwards[0].DstAddress) + assert.Equal(t, l1.Id.Token, rm1.Forwards[1].SrcAddress) + assert.Equal(t, l0.Id.Token, rm1.Forwards[1].DstAddress) + + // egress route message + rm2 := routeMessages[2] + assert.Equal(t, s0.Token, rm2.SessionId) + assert.NotNil(t, rm2.Egress) + assert.Equal(t, path.EgressId, rm2.Egress.Address) + assert.Equal(t, transportAddr.String(), rm2.Egress.Destination) + assert.Equal(t, path.EgressId, rm2.Forwards[0].SrcAddress) + assert.Equal(t, l1.Id.Token, rm2.Forwards[0].DstAddress) + assert.Equal(t, l1.Id.Token, rm2.Forwards[1].SrcAddress) + assert.Equal(t, path.EgressId, rm2.Forwards[1].DstAddress) +} + +func newRouterForTest(id string, fingerprint string, advLstnr transport.Address, ctrl channel2.Channel) *Router { + r := &Router{ + BaseEntity: models.BaseEntity{Id: id}, + Fingerprint: &fingerprint, + Control: ctrl, + } + if advLstnr != nil { + r.AdvertisedListener = advLstnr.String() + } + return r +} + +type VersionProviderTest struct { +} + +func (v VersionProviderTest) Branch() string { + return "local" +} + +func (v VersionProviderTest) EncoderDecoder() common.VersionEncDec { + return &common.StdVersionEncDec +} + +func (v VersionProviderTest) Version() string { + return "v0.0.0" +} + +func (v VersionProviderTest) BuildDate() string { + return time.Now().String() +} + +func (v VersionProviderTest) Revision() string { + return "" +} + +func (v VersionProviderTest) AsVersionInfo() *common.VersionInfo { + return &common.VersionInfo{ + Version: v.Version(), + Revision: v.Revision(), + BuildDate: v.BuildDate(), + OS: runtime.GOOS, + Arch: runtime.GOARCH, + } +} + +func NewVersionProviderTest() common.VersionProvider { + return &VersionProviderTest{} +} + func TestShortestPath(t *testing.T) { ctx := db.NewTestContext(t) defer ctx.Cleanup() diff --git a/controller/network/routesender.go b/controller/network/routesender.go index 602aa62ac..5ffe59596 100644 --- a/controller/network/routesender.go +++ b/controller/network/routesender.go @@ -57,7 +57,7 @@ func (self *routeSenderController) removeRouteSender(rs *routeSender) { type routeSender struct { sessionId string - circuit *Circuit + path *Path routeMsgs []*ctrl_pb.Route timeout time.Duration in chan *routeStatus @@ -75,11 +75,11 @@ func newRouteSender(sessionId string, timeout time.Duration, serviceCounters Ser } } -func (self *routeSender) route(attempt uint32, circuit *Circuit, routeMsgs []*ctrl_pb.Route, strategy xt.Strategy, terminator xt.Terminator) (peerData xt.PeerData, cleanups map[string]struct{}, err error) { +func (self *routeSender) route(attempt uint32, path *Path, routeMsgs []*ctrl_pb.Route, strategy xt.Strategy, terminator xt.Terminator) (peerData xt.PeerData, cleanups map[string]struct{}, err error) { // send route messages - tr := circuit.Path[len(circuit.Path)-1] - for i := 0; i < len(circuit.Path); i++ { - r := circuit.Path[i] + tr := path.Nodes[len(path.Nodes)-1] + for i := 0; i < len(path.Nodes); i++ { + r := path.Nodes[i] go self.sendRoute(r, routeMsgs[i]) self.attendance[r.Id] = false } @@ -112,7 +112,7 @@ attendance: strategy.NotifyEvent(xt.NewDialFailedEvent(terminator)) self.serviceCounters.ServiceDialFail(terminator.GetServiceId()) } - cleanups = self.cleanups(circuit) + cleanups = self.cleanups(path) return nil, cleanups, errors.Errorf("error creating route for [s/%s] on [r/%s] (%v)", self.sessionId, status.r.Id, status.rerr) } else { @@ -121,7 +121,7 @@ attendance: } case <-time.After(timeout): - cleanups = self.cleanups(circuit) + cleanups = self.cleanups(path) self.serviceCounters.ServiceDialTimeout(terminator.GetServiceId()) return nil, cleanups, &routeTimeoutError{sessionId: self.sessionId} } @@ -153,9 +153,9 @@ func (self *routeSender) sendRoute(r *Router, routeMsg *ctrl_pb.Route) { logrus.Debugf("sent route message for [s/%s] to [r/%s]", routeMsg.SessionId, r.Id) } -func (self *routeSender) cleanups(circuit *Circuit) map[string]struct{} { +func (self *routeSender) cleanups(path *Path) map[string]struct{} { cleanups := make(map[string]struct{}) - for _, r := range circuit.Path { + for _, r := range path.Nodes { success, found := self.attendance[r.Id] if found && success { cleanups[r.Id] = struct{}{} diff --git a/controller/network/session.go b/controller/network/session.go index 38467fd3e..708936690 100644 --- a/controller/network/session.go +++ b/controller/network/session.go @@ -28,14 +28,14 @@ type Session struct { ClientId *identity.TokenId Service *Service Terminator xt.Terminator - Circuit *Circuit + Path *Path Rerouting concurrenz.AtomicBoolean PeerData xt.PeerData } func (s *Session) latency() int64 { var latency int64 - for _, l := range s.Circuit.Links { + for _, l := range s.Path.Links { latency += l.GetSrcLatency() latency += l.GetDstLatency() } diff --git a/controller/network/session_lifecycle.go b/controller/network/session_lifecycle.go index 257ea5979..f0844956c 100644 --- a/controller/network/session_lifecycle.go +++ b/controller/network/session_lifecycle.go @@ -28,17 +28,17 @@ func getSessionEventHandlers() []SessionEventHandler { } type SessionEventHandler interface { - SessionCreated(sessionId *identity.TokenId, clientId *identity.TokenId, serviceId string, circuit *Circuit) + SessionCreated(sessionId *identity.TokenId, clientId *identity.TokenId, serviceId string, path *Path) SessionDeleted(sessionId *identity.TokenId, clientId *identity.TokenId) - CircuitUpdated(sessionId *identity.TokenId, circuit *Circuit) + PathUpdated(sessionId *identity.TokenId, path *Path) } -func (network *Network) SessionCreated(sessionId *identity.TokenId, clientId *identity.TokenId, serviceId string, circuit *Circuit) { +func (network *Network) SessionCreated(sessionId *identity.TokenId, clientId *identity.TokenId, serviceId string, path *Path) { event := &sessionCreatedEvent{ sessionId: sessionId, clientId: clientId, serviceId: serviceId, - circuit: circuit, + path: path, } network.eventDispatcher.Dispatch(event) } @@ -51,10 +51,10 @@ func (network *Network) SessionDeleted(sessionId *identity.TokenId, clientId *id network.eventDispatcher.Dispatch(event) } -func (network *Network) CircuitUpdated(sessionId *identity.TokenId, circuit *Circuit) { - event := &sessionCircuitEvent{ +func (network *Network) PathUpdated(sessionId *identity.TokenId, path *Path) { + event := &sessionPathEvent{ sessionId: sessionId, - circuit: circuit, + path: path, } network.eventDispatcher.Dispatch(event) } @@ -63,13 +63,13 @@ type sessionCreatedEvent struct { sessionId *identity.TokenId clientId *identity.TokenId serviceId string - circuit *Circuit + path *Path } func (event *sessionCreatedEvent) Handle() { handlers := getSessionEventHandlers() for _, handler := range handlers { - go handler.SessionCreated(event.sessionId, event.clientId, event.serviceId, event.circuit) + go handler.SessionCreated(event.sessionId, event.clientId, event.serviceId, event.path) } } @@ -85,14 +85,14 @@ func (event *sessionDeletedEvent) Handle() { } } -type sessionCircuitEvent struct { +type sessionPathEvent struct { sessionId *identity.TokenId - circuit *Circuit + path *Path } -func (event *sessionCircuitEvent) Handle() { +func (event *sessionPathEvent) Handle() { handlers := getSessionEventHandlers() for _, handler := range handlers { - go handler.CircuitUpdated(event.sessionId, event.circuit) + go handler.PathUpdated(event.sessionId, event.path) } } diff --git a/controller/network/smart.go b/controller/network/smart.go index f5559132a..c271064d6 100644 --- a/controller/network/smart.go +++ b/controller/network/smart.go @@ -53,7 +53,7 @@ func (network *Network) smart() { /* * Develop candidates for rerouting. */ - newCircuits := make(map[*Session]*Circuit) + newPaths := make(map[*Session]*Path) var candidates []*Session count := 0 ceiling := int(float32(len(sessions)) * network.options.Smart.RerouteFraction) @@ -66,13 +66,13 @@ func (network *Network) smart() { log.Tracef("smart reroute ceiling [%d]", ceiling) for _, sId := range orderedSessions { if session, found := network.GetSession(sId); found { - if updatedCircuit, err := network.UpdateCircuit(session.Circuit); err == nil { - if !updatedCircuit.EqualPath(session.Circuit) { + if updatedPath, err := network.UpdatePath(session.Path); err == nil { + if !updatedPath.EqualPath(session.Path) { if count < ceiling { count++ candidates = append(candidates, session) - newCircuits[session] = updatedCircuit - log.Debugf("rerouting [s/%s] [l:%d] %s ==> %s", session.Id.Token, sessionLatencies[session.Id], session.Circuit.String(), updatedCircuit.String()) + newPaths[session] = updatedPath + log.Debugf("rerouting [s/%s] [l:%d] %s ==> %s", session.Id.Token, sessionLatencies[session.Id], session.Path.String(), updatedPath.String()) } } } @@ -84,7 +84,7 @@ func (network *Network) smart() { * Reroute. */ for _, session := range candidates { - if err := network.smartReroute(session, newCircuits[session]); err != nil { + if err := network.smartReroute(session, newPaths[session]); err != nil { log.Errorf("error rerouting [s/%s] (%s)", session.Id.Token, err) } } diff --git a/events/sessions.go b/events/sessions.go index edde9535f..3a2168785 100644 --- a/events/sessions.go +++ b/events/sessions.go @@ -66,42 +66,42 @@ type fabricSessionCreatedEventAdapter struct { wrapped network.SessionEventHandler } -func (adapter *fabricSessionCreatedEventAdapter) SessionCreated(sessionId *identity.TokenId, clientId *identity.TokenId, serviceId string, circuit *network.Circuit) { +func (adapter *fabricSessionCreatedEventAdapter) SessionCreated(sessionId *identity.TokenId, clientId *identity.TokenId, serviceId string, circuit *network.Path) { adapter.wrapped.SessionCreated(sessionId, clientId, serviceId, circuit) } func (adapter *fabricSessionCreatedEventAdapter) SessionDeleted(*identity.TokenId, *identity.TokenId) { } -func (adapter *fabricSessionCreatedEventAdapter) CircuitUpdated(*identity.TokenId, *network.Circuit) { +func (adapter *fabricSessionCreatedEventAdapter) PathUpdated(*identity.TokenId, *network.Path) { } type fabricSessionDeletedEventAdapter struct { wrapped network.SessionEventHandler } -func (adapter *fabricSessionDeletedEventAdapter) SessionCreated(*identity.TokenId, *identity.TokenId, string, *network.Circuit) { +func (adapter *fabricSessionDeletedEventAdapter) SessionCreated(*identity.TokenId, *identity.TokenId, string, *network.Path) { } func (adapter *fabricSessionDeletedEventAdapter) SessionDeleted(sessionId *identity.TokenId, clientId *identity.TokenId) { adapter.wrapped.SessionDeleted(sessionId, clientId) } -func (adapter *fabricSessionDeletedEventAdapter) CircuitUpdated(*identity.TokenId, *network.Circuit) { +func (adapter *fabricSessionDeletedEventAdapter) PathUpdated(*identity.TokenId, *network.Path) { } type fabricSessionCircuitUpdatedEventAdapter struct { wrapped network.SessionEventHandler } -func (adapter *fabricSessionCircuitUpdatedEventAdapter) SessionCreated(*identity.TokenId, *identity.TokenId, string, *network.Circuit) { +func (adapter *fabricSessionCircuitUpdatedEventAdapter) SessionCreated(*identity.TokenId, *identity.TokenId, string, *network.Path) { } func (adapter *fabricSessionCircuitUpdatedEventAdapter) SessionDeleted(*identity.TokenId, *identity.TokenId) { } -func (adapter *fabricSessionCircuitUpdatedEventAdapter) CircuitUpdated(sessionId *identity.TokenId, circuit *network.Circuit) { - adapter.wrapped.CircuitUpdated(sessionId, circuit) +func (adapter *fabricSessionCircuitUpdatedEventAdapter) PathUpdated(sessionId *identity.TokenId, circuit *network.Path) { + adapter.wrapped.PathUpdated(sessionId, circuit) } // Will work for all fabric session event types @@ -140,7 +140,7 @@ type sessionEventAdapter struct { handler SessionEventHandler } -func (adapter *sessionEventAdapter) SessionCreated(sessionId *identity.TokenId, clientId *identity.TokenId, serviceId string, circuit *network.Circuit) { +func (adapter *sessionEventAdapter) SessionCreated(sessionId *identity.TokenId, clientId *identity.TokenId, serviceId string, circuit *network.Path) { event := &SessionEvent{ Namespace: "fabric.sessions", EventType: "created", @@ -166,7 +166,7 @@ func (adapter *sessionEventAdapter) SessionDeleted(sessionId *identity.TokenId, adapter.handler.AcceptSessionEvent(event) } -func (adapter *sessionEventAdapter) CircuitUpdated(sessionId *identity.TokenId, circuit *network.Circuit) { +func (adapter *sessionEventAdapter) PathUpdated(sessionId *identity.TokenId, circuit *network.Path) { event := &SessionEvent{ Namespace: "fabric.sessions", EventType: "circuitUpdated", diff --git a/pb/ctrl_pb/generate.go b/pb/ctrl_pb/generate.go new file mode 100644 index 000000000..31a9b97a0 --- /dev/null +++ b/pb/ctrl_pb/generate.go @@ -0,0 +1,5 @@ +//go:generate protoc -I ./ ./ctrl.proto --go_out=paths=source_relative:./ + +package ctrl_pb + +// Here to provide the go:generate line above diff --git a/pb/mgmt_pb/decoder.go b/pb/mgmt_pb/decoder.go index 0d73ff063..09f9f820d 100644 --- a/pb/mgmt_pb/decoder.go +++ b/pb/mgmt_pb/decoder.go @@ -439,16 +439,16 @@ func routerToString(router *Router) string { return fmt.Sprintf("{id=[%s] fingerprint=[%s] listener=[%s] connected=[%t]}", router.Id, router.Fingerprint, router.ListenerAddress, router.Connected) } -func (circuit *Circuit) CalculateDisplayPath() string { - if circuit == nil { +func (self *Path) CalculateDisplayPath() string { + if self == nil { return "" } out := "" - for i := 0; i < len(circuit.Path); i++ { - if i < len(circuit.Links) { - out += fmt.Sprintf("[r/%s]->{l/%s}->", circuit.Path[i], circuit.Links[i]) + for i := 0; i < len(self.Nodes); i++ { + if i < len(self.Links) { + out += fmt.Sprintf("[r/%s]->{l/%s}->", self.Nodes[i], self.Links[i]) } else { - out += fmt.Sprintf("[r/%s]\n", circuit.Path[i]) + out += fmt.Sprintf("[r/%s]\n", self.Nodes[i]) } } return out diff --git a/pb/mgmt_pb/generate.go b/pb/mgmt_pb/generate.go new file mode 100644 index 000000000..c09b72919 --- /dev/null +++ b/pb/mgmt_pb/generate.go @@ -0,0 +1,5 @@ +//go:generate protoc -I ./ ./mgmt.proto --go_out=paths=source_relative:./ + +package mgmt_pb + +// Here to provide the go:generate line above diff --git a/pb/mgmt_pb/mgmt.pb.go b/pb/mgmt_pb/mgmt.pb.go index 46329d231..94391c0c9 100644 --- a/pb/mgmt_pb/mgmt.pb.go +++ b/pb/mgmt_pb/mgmt.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 -// protoc v3.15.8 +// protoc-gen-go v1.25.0-devel +// protoc v3.14.0 // source: mgmt.proto package mgmt_pb @@ -285,7 +285,7 @@ const ( StreamSessionEventType_SessionCreated StreamSessionEventType = 0 StreamSessionEventType_SessionDeleted StreamSessionEventType = 1 StreamSessionEventType_SessionPresent StreamSessionEventType = 2 - StreamSessionEventType_CircuitUpdated StreamSessionEventType = 3 + StreamSessionEventType_PathUpdated StreamSessionEventType = 3 ) // Enum value maps for StreamSessionEventType. @@ -294,13 +294,13 @@ var ( 0: "SessionCreated", 1: "SessionDeleted", 2: "SessionPresent", - 3: "CircuitUpdated", + 3: "PathUpdated", } StreamSessionEventType_value = map[string]int32{ "SessionCreated": 0, "SessionDeleted": 1, "SessionPresent": 2, - "CircuitUpdated": 3, + "PathUpdated": 3, } ) @@ -1808,17 +1808,17 @@ func (x *SetLinkDownRequest) GetDown() bool { return false } -type Circuit struct { +type Path struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Path []string `protobuf:"bytes,1,rep,name=path,proto3" json:"path,omitempty"` + Nodes []string `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` Links []string `protobuf:"bytes,2,rep,name=links,proto3" json:"links,omitempty"` } -func (x *Circuit) Reset() { - *x = Circuit{} +func (x *Path) Reset() { + *x = Path{} if protoimpl.UnsafeEnabled { mi := &file_mgmt_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1826,13 +1826,13 @@ func (x *Circuit) Reset() { } } -func (x *Circuit) String() string { +func (x *Path) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Circuit) ProtoMessage() {} +func (*Path) ProtoMessage() {} -func (x *Circuit) ProtoReflect() protoreflect.Message { +func (x *Path) ProtoReflect() protoreflect.Message { mi := &file_mgmt_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1844,19 +1844,19 @@ func (x *Circuit) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Circuit.ProtoReflect.Descriptor instead. -func (*Circuit) Descriptor() ([]byte, []int) { +// Deprecated: Use Path.ProtoReflect.Descriptor instead. +func (*Path) Descriptor() ([]byte, []int) { return file_mgmt_proto_rawDescGZIP(), []int{25} } -func (x *Circuit) GetPath() []string { +func (x *Path) GetNodes() []string { if x != nil { - return x.Path + return x.Nodes } return nil } -func (x *Circuit) GetLinks() []string { +func (x *Path) GetLinks() []string { if x != nil { return x.Links } @@ -1868,11 +1868,11 @@ type Session struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ClientId string `protobuf:"bytes,2,opt,name=clientId,proto3" json:"clientId,omitempty"` - ServiceId string `protobuf:"bytes,3,opt,name=serviceId,proto3" json:"serviceId,omitempty"` - TerminatorId string `protobuf:"bytes,4,opt,name=terminatorId,proto3" json:"terminatorId,omitempty"` - Circuit *Circuit `protobuf:"bytes,5,opt,name=circuit,proto3" json:"circuit,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ClientId string `protobuf:"bytes,2,opt,name=clientId,proto3" json:"clientId,omitempty"` + ServiceId string `protobuf:"bytes,3,opt,name=serviceId,proto3" json:"serviceId,omitempty"` + TerminatorId string `protobuf:"bytes,4,opt,name=terminatorId,proto3" json:"terminatorId,omitempty"` + Path *Path `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"` } func (x *Session) Reset() { @@ -1935,9 +1935,9 @@ func (x *Session) GetTerminatorId() string { return "" } -func (x *Session) GetCircuit() *Circuit { +func (x *Session) GetPath() *Path { if x != nil { - return x.Circuit + return x.Path } return nil } @@ -2271,7 +2271,7 @@ type StreamSessionsEvent struct { SessionId string `protobuf:"bytes,2,opt,name=sessionId,proto3" json:"sessionId,omitempty"` ClientId string `protobuf:"bytes,3,opt,name=clientId,proto3" json:"clientId,omitempty"` ServiceId string `protobuf:"bytes,4,opt,name=serviceId,proto3" json:"serviceId,omitempty"` - Circuit *Circuit `protobuf:"bytes,5,opt,name=circuit,proto3" json:"circuit,omitempty"` + Path *Path `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"` } func (x *StreamSessionsEvent) Reset() { @@ -2334,9 +2334,9 @@ func (x *StreamSessionsEvent) GetServiceId() string { return "" } -func (x *StreamSessionsEvent) GetCircuit() *Circuit { +func (x *StreamSessionsEvent) GetPath() *Path { if x != nil { - return x.Circuit + return x.Path } return nil } @@ -2926,250 +2926,248 @@ var file_mgmt_proto_rawDesc = []byte{ 0x65, 0x73, 0x74, 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, 0x12, 0x0a, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x77, 0x6e, 0x22, - 0x33, 0x0a, 0x07, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, - 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6c, - 0x69, 0x6e, 0x6b, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x2a, - 0x0a, 0x07, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, - 0x74, 0x52, 0x07, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69, - 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x44, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x67, - 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x46, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, - 0xb4, 0x01, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x08, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, - 0x74, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x73, 0x1a, 0x53, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, - 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x44, 0x52, 0x65, 0x67, 0x65, - 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, - 0x44, 0x52, 0x65, 0x67, 0x65, 0x78, 0x22, 0xa2, 0x08, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, - 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x12, 0x39, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x54, - 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x4b, - 0x0a, 0x0a, 0x69, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, - 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, - 0x49, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0a, 0x69, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x51, 0x0a, 0x0c, 0x66, - 0x6c, 0x6f, 0x61, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x46, - 0x6c, 0x6f, 0x61, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x54, - 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, + 0x32, 0x0a, 0x04, 0x50, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x14, 0x0a, + 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x69, + 0x6e, 0x6b, 0x73, 0x22, 0x9a, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x21, 0x0a, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6d, 0x67, + 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x44, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x46, 0x0a, + 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0xb4, 0x01, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, + 0x0a, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x08, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x53, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x52, 0x65, 0x67, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x49, 0x44, 0x52, 0x65, 0x67, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x44, 0x52, 0x65, 0x67, 0x65, 0x78, 0x22, 0xa2, 0x08, 0x0a, + 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, + 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x39, 0x0a, 0x04, 0x74, 0x61, 0x67, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x52, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x12, 0x4e, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, - 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x47, - 0x72, 0x6f, 0x75, 0x70, 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, 0x1a, 0x3d, 0x0a, - 0x0f, 0x49, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 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, - 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, - 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 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, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0xbb, 0x02, - 0x0a, 0x0e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x55, 0x54, 0x43, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x55, 0x54, 0x43, 0x12, 0x42, 0x0a, 0x0e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x45, 0x6e, 0x64, 0x55, 0x54, 0x43, 0x18, 0x03, + 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, + 0x74, 0x61, 0x67, 0x73, 0x12, 0x4b, 0x0a, 0x0a, 0x69, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, + 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x12, 0x51, 0x0a, 0x0c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, + 0x62, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x12, 0x54, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x4e, 0x0a, 0x0b, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 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, 0x1a, 0x3d, 0x0a, 0x0f, 0x49, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 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, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 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, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0xbb, 0x02, 0x0a, 0x0e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x10, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x55, 0x54, 0x43, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x45, 0x6e, 0x64, 0x55, 0x54, 0x43, - 0x12, 0x4e, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x36, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x1a, 0x39, 0x0a, 0x0b, 0x56, 0x61, 0x6c, 0x75, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 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, 0x17, 0x0a, 0x15, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0xd8, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x09, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x2e, 0x43, - 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x52, 0x07, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x22, - 0x7a, 0x0a, 0x1a, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x52, 0x65, 0x67, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x65, 0x78, 0x22, 0x99, 0x01, 0x0a, 0x13, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x0a, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, - 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x56, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x70, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x70, 0x70, - 0x52, 0x65, 0x67, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x70, 0x70, - 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, - 0xd2, 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, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 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, 0x4e, 0x0a, 0x0c, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x2a, 0xc2, 0x08, 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, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0x91, 0x4e, 0x12, 0x1d, 0x0a, 0x18, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0x92, 0x4e, 0x12, 0x1d, 0x0a, 0x18, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0x93, 0x4e, 0x12, 0x1d, 0x0a, 0x18, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0x95, 0x4e, 0x12, 0x1a, 0x0a, 0x15, 0x47, 0x65, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x10, 0x96, 0x4e, 0x12, 0x1b, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, - 0x97, 0x4e, 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, 0xc2, 0x4e, 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, 0xc3, 0x4e, 0x12, 0x1f, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x10, 0xc4, 0x4e, 0x12, 0x20, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x54, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xc5, 0x4e, 0x12, 0x1d, 0x0a, 0x18, 0x47, 0x65, 0x74, - 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xc6, 0x4e, 0x12, 0x1e, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xc7, 0x4e, 0x12, 0x21, 0x0a, 0x1c, 0x53, 0x65, 0x74, 0x54, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xc8, 0x4e, 0x12, 0x1b, 0x0a, 0x16, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0x9a, 0x4e, 0x12, 0x1c, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x10, 0x9b, 0x4e, 0x12, 0x1c, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x10, 0x9c, 0x4e, 0x12, 0x1c, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, - 0x9d, 0x4e, 0x12, 0x19, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xa4, 0x4e, 0x12, 0x1a, 0x0a, - 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xa5, 0x4e, 0x12, 0x1b, 0x0a, 0x16, 0x53, 0x65, 0x74, - 0x4c, 0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x10, 0xa6, 0x4e, 0x12, 0x1b, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x6e, - 0x6b, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x10, 0xa7, 0x4e, 0x12, 0x1c, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xae, - 0x4e, 0x12, 0x1d, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xaf, 0x4e, - 0x12, 0x1d, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xb0, 0x4e, 0x12, - 0x1d, 0x0a, 0x18, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xb8, 0x4e, 0x12, 0x1b, - 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xb9, 0x4e, 0x12, 0x1e, 0x0a, 0x19, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xba, 0x4e, 0x12, 0x1c, 0x0a, 0x17, 0x53, + 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x55, + 0x54, 0x43, 0x12, 0x42, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x45, 0x6e, + 0x64, 0x55, 0x54, 0x43, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x45, 0x6e, 0x64, 0x55, 0x54, 0x43, 0x12, 0x4e, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, + 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x56, 0x61, 0x6c, 0x75, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, + 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, 0x17, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xcf, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xbb, 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, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 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, 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, 0x51, 0x0a, 0x14, 0x54, 0x65, 0x72, 0x6d, - 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x73, 0x6b, - 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x63, 0x43, 0x6f, 0x73, 0x74, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x72, - 0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x79, - 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x73, 0x74, 0x10, 0x04, 0x2a, 0x68, 0x0a, 0x16, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x12, 0x0a, - 0x0e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x10, - 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x10, 0x03, 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, + 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, 0x62, 0x2e, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 0x70, + 0x62, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x7a, 0x0a, 0x1a, + 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, + 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x67, + 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x67, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x65, 0x78, 0x22, 0x99, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x67, 0x6d, + 0x74, 0x5f, 0x70, 0x62, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x22, 0x56, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x52, 0x65, 0x67, + 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x70, 0x70, 0x52, 0x65, 0x67, + 0x65, 0x78, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0xd2, 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, 0x6d, 0x67, 0x6d, 0x74, 0x5f, 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, 0x4e, 0x0a, 0x0c, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x2a, 0xc2, 0x08, 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, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0x91, 0x4e, 0x12, 0x1d, 0x0a, 0x18, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0x92, 0x4e, 0x12, 0x1d, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x10, 0x93, 0x4e, 0x12, 0x1d, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x10, 0x95, 0x4e, 0x12, 0x1a, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, + 0x96, 0x4e, 0x12, 0x1b, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0x97, 0x4e, 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, 0xc2, + 0x4e, 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, 0xc3, 0x4e, 0x12, 0x1f, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x10, 0xc4, 0x4e, 0x12, 0x20, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x10, 0xc5, 0x4e, 0x12, 0x1d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x54, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x10, 0xc6, 0x4e, 0x12, 0x1e, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x10, 0xc7, 0x4e, 0x12, 0x21, 0x0a, 0x1c, 0x53, 0x65, 0x74, 0x54, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xc8, 0x4e, 0x12, 0x1b, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x10, 0x9a, 0x4e, 0x12, 0x1c, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x10, 0x9b, 0x4e, 0x12, 0x1c, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0x9c, + 0x4e, 0x12, 0x1c, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0x9d, 0x4e, 0x12, + 0x19, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xa4, 0x4e, 0x12, 0x1a, 0x0a, 0x15, 0x4c, 0x69, + 0x73, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x10, 0xa5, 0x4e, 0x12, 0x1b, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x6e, + 0x6b, 0x43, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x10, 0xa6, 0x4e, 0x12, 0x1b, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x6e, 0x6b, 0x44, 0x6f, + 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xa7, 0x4e, + 0x12, 0x1c, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xae, 0x4e, 0x12, 0x1d, + 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xaf, 0x4e, 0x12, 0x1d, 0x0a, + 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xb0, 0x4e, 0x12, 0x1d, 0x0a, 0x18, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xb8, 0x4e, 0x12, 0x1b, 0x0a, 0x16, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xb9, 0x4e, 0x12, 0x1e, 0x0a, 0x19, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xba, 0x4e, 0x12, 0x1c, 0x0a, 0x17, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x10, 0xbb, 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, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 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, 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, 0x51, 0x0a, 0x14, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, + 0x74, 0x6f, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x08, 0x0a, + 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x63, 0x43, 0x6f, 0x73, 0x74, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x72, 0x65, 0x63, 0x65, + 0x64, 0x65, 0x6e, 0x63, 0x65, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x79, 0x6e, 0x61, 0x6d, + 0x69, 0x63, 0x43, 0x6f, 0x73, 0x74, 0x10, 0x04, 0x2a, 0x65, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 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, 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, } var ( @@ -3217,7 +3215,7 @@ var file_mgmt_proto_goTypes = []interface{}{ (*ListLinksResponse)(nil), // 27: mgmt_pb.ListLinksResponse (*SetLinkCostRequest)(nil), // 28: mgmt_pb.SetLinkCostRequest (*SetLinkDownRequest)(nil), // 29: mgmt_pb.SetLinkDownRequest - (*Circuit)(nil), // 30: mgmt_pb.Circuit + (*Path)(nil), // 30: mgmt_pb.Path (*Session)(nil), // 31: mgmt_pb.Session (*ListSessionsRequest)(nil), // 32: mgmt_pb.ListSessionsRequest (*ListSessionsResponse)(nil), // 33: mgmt_pb.ListSessionsResponse @@ -3253,7 +3251,7 @@ var file_mgmt_proto_depIdxs = []int32{ 20, // 9: mgmt_pb.ListRoutersResponse.routers:type_name -> mgmt_pb.Router 20, // 10: mgmt_pb.CreateRouterRequest.router:type_name -> mgmt_pb.Router 25, // 11: mgmt_pb.ListLinksResponse.links:type_name -> mgmt_pb.Link - 30, // 12: mgmt_pb.Session.circuit:type_name -> mgmt_pb.Circuit + 30, // 12: mgmt_pb.Session.path:type_name -> mgmt_pb.Path 31, // 13: mgmt_pb.ListSessionsResponse.sessions:type_name -> mgmt_pb.Session 43, // 14: mgmt_pb.StreamMetricsRequest.matchers:type_name -> mgmt_pb.StreamMetricsRequest.MetricMatcher 51, // 15: mgmt_pb.StreamMetricsEvent.timestamp:type_name -> google.protobuf.Timestamp @@ -3263,7 +3261,7 @@ var file_mgmt_proto_depIdxs = []int32{ 47, // 19: mgmt_pb.StreamMetricsEvent.intervalMetrics:type_name -> mgmt_pb.StreamMetricsEvent.IntervalMetric 48, // 20: mgmt_pb.StreamMetricsEvent.metricGroup:type_name -> mgmt_pb.StreamMetricsEvent.MetricGroupEntry 3, // 21: mgmt_pb.StreamSessionsEvent.eventType:type_name -> mgmt_pb.StreamSessionEventType - 30, // 22: mgmt_pb.StreamSessionsEvent.circuit:type_name -> mgmt_pb.Circuit + 30, // 22: mgmt_pb.StreamSessionsEvent.path:type_name -> mgmt_pb.Path 4, // 23: mgmt_pb.StreamTracesRequest.filterType:type_name -> mgmt_pb.TraceFilterType 50, // 24: mgmt_pb.InspectResponse.values:type_name -> mgmt_pb.InspectResponse.InspectValue 51, // 25: mgmt_pb.StreamMetricsEvent.IntervalMetric.intervalStartUTC:type_name -> google.protobuf.Timestamp @@ -3583,7 +3581,7 @@ func file_mgmt_proto_init() { } } file_mgmt_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Circuit); i { + switch v := v.(*Path); i { case 0: return &v.state case 1: diff --git a/pb/mgmt_pb/mgmt.proto b/pb/mgmt_pb/mgmt.proto index 7d3489659..0e815a50b 100644 --- a/pb/mgmt_pb/mgmt.proto +++ b/pb/mgmt_pb/mgmt.proto @@ -6,60 +6,60 @@ option go_package = "github.com/openziti/fabric/pb/mgmt_pb"; import "google/protobuf/timestamp.proto"; enum ContentType { - // Protoc says this has to be here - Zero = 0; + // Protoc says this has to be here + Zero = 0; - // Services - ListServicesRequestType = 10001; - ListServicesResponseType = 10002; - CreateServiceRequestType = 10003; - RemoveServiceRequestType = 10005; - GetServiceRequestType = 10006; - GetServiceResponseType = 10007; + // Services + ListServicesRequestType = 10001; + ListServicesResponseType = 10002; + CreateServiceRequestType = 10003; + RemoveServiceRequestType = 10005; + GetServiceRequestType = 10006; + GetServiceResponseType = 10007; - // Service Terminators - CreateTerminatorRequestType = 10050; - RemoveTerminatorRequestType = 10051; - ListTerminatorsRequestType = 10052; - ListTerminatorsResponseType = 10053; - GetTerminatorRequestType = 10054; - GetTerminatorResponseType = 10055; - SetTerminatorCostRequestType = 10056; + // Service Terminators + CreateTerminatorRequestType = 10050; + RemoveTerminatorRequestType = 10051; + ListTerminatorsRequestType = 10052; + ListTerminatorsResponseType = 10053; + GetTerminatorRequestType = 10054; + GetTerminatorResponseType = 10055; + SetTerminatorCostRequestType = 10056; - // Routers - ListRoutersRequestType = 10010; - ListRoutersResponseType = 10011; - CreateRouterRequestType = 10012; - RemoveRouterRequestType = 10013; + // Routers + ListRoutersRequestType = 10010; + ListRoutersResponseType = 10011; + CreateRouterRequestType = 10012; + RemoveRouterRequestType = 10013; - // Links - ListLinksRequestType = 10020; - ListLinksResponseType = 10021; - SetLinkCostRequestType = 10022; - SetLinkDownRequestType = 10023; + // Links + ListLinksRequestType = 10020; + ListLinksResponseType = 10021; + SetLinkCostRequestType = 10022; + SetLinkDownRequestType = 10023; - // Sessions - ListSessionsRequestType = 10030; - ListSessionsResponseType = 10031; - RemoveSessionRequestType = 10032; + // Sessions + ListSessionsRequestType = 10030; + ListSessionsResponseType = 10031; + RemoveSessionRequestType = 10032; - // Streams - StreamMetricsRequestType = 10040; - StreamMetricsEventType = 10041; - StreamSessionsRequestType = 10042; - StreamSessionsEventType = 10043; + // Streams + StreamMetricsRequestType = 10040; + StreamMetricsEventType = 10041; + StreamSessionsRequestType = 10042; + StreamSessionsEventType = 10043; - TogglePipeTracesRequestType = 10044; - ToggleSessionTracesRequestType = 10045; - StreamTracesRequestType = 10046; - StreamTracesEventType = 10047; + TogglePipeTracesRequestType = 10044; + ToggleSessionTracesRequestType = 10045; + StreamTracesRequestType = 10046; + StreamTracesEventType = 10047; - // Inspect - InspectRequestType = 10048; - InspectResponseType = 10049; + // Inspect + InspectRequestType = 10048; + InspectResponseType = 10049; - // Snapshot db - SnapshotDbRequestType = 10070; + // Snapshot db + SnapshotDbRequestType = 10070; } // @@ -67,92 +67,92 @@ enum ContentType { // enum TerminatorPrecedence { - Default = 0; - Required = 1; - Failed = 2; + Default = 0; + Required = 1; + Failed = 2; } enum TerminatorChangeMask { - None = 0; - StaticCost = 1; - Precedence = 2; - DynamicCost = 4; + None = 0; + StaticCost = 1; + Precedence = 2; + DynamicCost = 4; } message Service { - string id = 1; - string name = 2; - string terminatorStrategy = 3; - repeated Terminator terminators = 4; + string id = 1; + string name = 2; + string terminatorStrategy = 3; + repeated Terminator terminators = 4; } message Terminator { - string id = 1; - string serviceId = 2; - string routerId = 3; - string binding = 4; - string address = 5; - TerminatorPrecedence precedence = 8; - uint32 cost = 9; - string identity = 10; - bytes identitySecret = 11; + string id = 1; + string serviceId = 2; + string routerId = 3; + string binding = 4; + string address = 5; + TerminatorPrecedence precedence = 8; + uint32 cost = 9; + string identity = 10; + bytes identitySecret = 11; } message ListServicesRequest { - string query = 1; + string query = 1; } message ListServicesResponse { - repeated Service services = 1; + repeated Service services = 1; } message CreateServiceRequest { - Service service = 1; + Service service = 1; } message RemoveServiceRequest { - string serviceId = 1; + string serviceId = 1; } message GetServiceRequest { - string serviceId = 1; + string serviceId = 1; } message GetServiceResponse { - Service service = 1; + Service service = 1; } // service terminators message ListTerminatorsRequest { - string query = 1; + string query = 1; } message ListTerminatorsResponse { - repeated Terminator terminators = 1; + repeated Terminator terminators = 1; } message CreateTerminatorRequest { - Terminator terminator = 1; + Terminator terminator = 1; } message RemoveTerminatorRequest { - string terminatorId = 1; + string terminatorId = 1; } message GetTerminatorRequest { - string terminatorId = 1; + string terminatorId = 1; } message GetTerminatorResponse { - Terminator terminator = 1; + Terminator terminator = 1; } message SetTerminatorCostRequest { - string terminatorId = 1; - TerminatorPrecedence precedence = 2; - uint32 staticCost = 3; - uint32 dynamicCost = 4; - int32 updateMask = 5; + string terminatorId = 1; + TerminatorPrecedence precedence = 2; + uint32 staticCost = 3; + uint32 dynamicCost = 4; + int32 updateMask = 5; } // @@ -160,32 +160,32 @@ message SetTerminatorCostRequest { // message Router { - string id = 1; - string name = 2; - string fingerprint = 3; - string listenerAddress = 4; - bool connected = 5; - string version = 6; - string revision = 7; - string buildDate = 8; - string os = 9; - string arch = 10; + string id = 1; + string name = 2; + string fingerprint = 3; + string listenerAddress = 4; + bool connected = 5; + string version = 6; + string revision = 7; + string buildDate = 8; + string os = 9; + string arch = 10; } message ListRoutersRequest { - string query = 1; + string query = 1; } message ListRoutersResponse { - repeated Router routers = 1; + repeated Router routers = 1; } message CreateRouterRequest { - Router router = 1; + Router router = 1; } message RemoveRouterRequest { - string routerId = 1; + string routerId = 1; } // @@ -193,58 +193,58 @@ message RemoveRouterRequest { // message Link { - string id = 1; - string src = 2; - string dst = 3; - string state = 4; - bool down = 5; - int32 cost = 6; - int64 srcLatency = 7; - int64 dstLatency = 8; + string id = 1; + string src = 2; + string dst = 3; + string state = 4; + bool down = 5; + int32 cost = 6; + int64 srcLatency = 7; + int64 dstLatency = 8; } message ListLinksRequest { } message ListLinksResponse { - repeated Link links = 1; + repeated Link links = 1; } message SetLinkCostRequest { - string linkId = 1; - int32 cost = 2; + string linkId = 1; + int32 cost = 2; } message SetLinkDownRequest { - string linkId = 1; - bool down = 2; + string linkId = 1; + bool down = 2; } // // --- Session ------------------------------------------------------------------------------------------------------ // // -message Circuit { - repeated string path = 1; - repeated string links = 2; +message Path { + repeated string nodes = 1; + repeated string links = 2; } message Session { - string id = 1; - string clientId = 2; - string serviceId = 3; - string terminatorId = 4; - Circuit circuit = 5; + string id = 1; + string clientId = 2; + string serviceId = 3; + string terminatorId = 4; + Path path = 5; } message ListSessionsRequest { } message ListSessionsResponse { - repeated Session sessions = 1; + repeated Session sessions = 1; } message RemoveSessionRequest { - string sessionId = 1; - bool now = 2; + string sessionId = 1; + bool now = 2; } // @@ -252,82 +252,82 @@ message RemoveSessionRequest { // message StreamMetricsRequest { - repeated MetricMatcher matchers = 1; + repeated MetricMatcher matchers = 1; - message MetricMatcher { - string nameRegex = 1; - string sourceIDRegex = 2; - } + message MetricMatcher { + string nameRegex = 1; + string sourceIDRegex = 2; + } } message StreamMetricsEvent { - string sourceId = 1; - google.protobuf.Timestamp timestamp = 2; - map tags = 3; + string sourceId = 1; + google.protobuf.Timestamp timestamp = 2; + map tags = 3; - map intMetrics = 4; - map floatMetrics = 5; + map intMetrics = 4; + map floatMetrics = 5; - repeated IntervalMetric intervalMetrics = 6; + repeated IntervalMetric intervalMetrics = 6; - message IntervalMetric { - string name = 1; - google.protobuf.Timestamp intervalStartUTC = 2; - google.protobuf.Timestamp intervalEndUTC = 3; - map values = 4; - } + message IntervalMetric { + string name = 1; + google.protobuf.Timestamp intervalStartUTC = 2; + google.protobuf.Timestamp intervalEndUTC = 3; + map values = 4; + } - map metricGroup = 7; + map metricGroup = 7; } message StreamSessionsRequest { } enum StreamSessionEventType { - SessionCreated = 0; - SessionDeleted = 1; - SessionPresent = 2; - CircuitUpdated = 3; + SessionCreated = 0; + SessionDeleted = 1; + SessionPresent = 2; + PathUpdated = 3; } message StreamSessionsEvent { - StreamSessionEventType eventType = 1; - string sessionId = 2; - string clientId = 3; - string serviceId = 4; - Circuit circuit = 5; + StreamSessionEventType eventType = 1; + string sessionId = 2; + string clientId = 3; + string serviceId = 4; + Path path = 5; } message ToggleSessionTracesRequest { - bool enable = 1; - string serviceRegex = 2; - string clientRegex = 3; + bool enable = 1; + string serviceRegex = 2; + string clientRegex = 3; } enum TraceFilterType { - EXCLUDE = 0; - INCLUDE = 1; + EXCLUDE = 0; + INCLUDE = 1; } message StreamTracesRequest { - bool enabledFilter = 1; - TraceFilterType filterType = 2; - repeated int32 contentTypes = 3; + bool enabledFilter = 1; + TraceFilterType filterType = 2; + repeated int32 contentTypes = 3; } message InspectRequest { - string appRegex = 1; - repeated string requestedValues = 2; + string appRegex = 1; + repeated string requestedValues = 2; } message InspectResponse { - bool success = 1; - repeated string errors = 2; - repeated InspectValue values = 3; + bool success = 1; + repeated string errors = 2; + repeated InspectValue values = 3; - message InspectValue { - string appId = 1; - string name = 2; - string value = 3; - } + message InspectValue { + string appId = 1; + string name = 2; + string value = 3; + } }