Merge pull request openziti/fabric#498 from openziti/update-to-usage-v3

Update to usage v3. Adds circuit tags to usage. Fixes openziti/fabric#496
This commit is contained in:
Paul Lorenz
2022-09-16 12:21:17 -04:00
committed by GitHub
25 changed files with 514 additions and 220 deletions
+3 -3
View File
@@ -20,15 +20,15 @@ import (
"bytes"
"github.com/openziti/fabric/controller/api"
"github.com/openziti/fabric/controller/idgen"
"io/ioutil"
"io"
"net/http"
)
func NewRequestContext(rw http.ResponseWriter, r *http.Request) api.RequestContext {
rid := idgen.New()
body, _ := ioutil.ReadAll(r.Body)
r.Body = ioutil.NopCloser(bytes.NewReader(body))
body, _ := io.ReadAll(r.Body)
r.Body = io.NopCloser(bytes.NewReader(body))
requestContext := &api.RequestContextImpl{
Id: rid,
+2 -2
View File
@@ -28,8 +28,8 @@ import (
"github.com/openziti/fabric/controller/xmgmt"
"github.com/openziti/identity"
"github.com/openziti/xweb/v2"
"io/ioutil"
"net/http"
"os"
"strings"
)
@@ -77,7 +77,7 @@ func NewMetricsApiHandler(n *network.Network, options map[interface{}]interface{
if value, found := options["scrapeCert"]; found {
if f, ok := value.(string); ok {
p, err := ioutil.ReadFile(f)
p, err := os.ReadFile(f)
if nil != err {
return nil, err
}
+2 -2
View File
@@ -33,7 +33,7 @@ import (
"github.com/openziti/transport/v2"
"github.com/pkg/errors"
"gopkg.in/yaml.v2"
"io/ioutil"
"os"
"strings"
"time"
)
@@ -92,7 +92,7 @@ func (config *Config) Configure(sub config.Subconfig) error {
}
func LoadConfig(path string) (*Config, error) {
cfgBytes, err := ioutil.ReadFile(path)
cfgBytes, err := os.ReadFile(path)
if err != nil {
return nil, err
}
+4
View File
@@ -90,6 +90,10 @@ func (entity *Terminator) GetPeerData() xt.PeerData {
return entity.PeerData
}
func (entity *Terminator) GetHostId() string {
return entity.HostId
}
func (entity *Terminator) LoadValues(_ boltz.CrudStore, bucket *boltz.TypedBucket) {
entity.LoadBaseValues(bucket)
entity.Service = bucket.GetStringOrError(FieldTerminatorService)
+47 -2
View File
@@ -17,9 +17,10 @@
package handler_ctrl
import (
"github.com/openziti/fabric/controller/xt"
"google.golang.org/protobuf/proto"
"time"
"github.com/golang/protobuf/proto"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/channel"
"github.com/openziti/fabric/controller/network"
@@ -60,7 +61,7 @@ func (h *circuitRequestHandler) HandleReceive(msg *channel.Message, ch channel.C
}
}
log = log.WithField("serviceId", service)
if circuit, err := h.network.CreateCircuit(h.r, id, service, logcontext.NewContext(), time.Now().Add(network.DefaultNetworkOptionsRouteTimeout)); err == nil {
if circuit, err := h.network.CreateCircuit(h.newCircuitCreateParms(service, h.r, id)); err == nil {
responseMsg := ctrl_msg.NewCircuitSuccessMsg(circuit.Id, circuit.Path.IngressId)
responseMsg.ReplyTo(msg)
@@ -94,3 +95,47 @@ func (h *circuitRequestHandler) HandleReceive(msg *channel.Message, ch channel.C
log.Errorf("unexpected error (%s)", err)
}
}
func (h *circuitRequestHandler) newCircuitCreateParms(serviceId string, sourceRouter *network.Router, clientId *identity.TokenId) network.CreateCircuitParams {
return &circuitParams{
serviceId: serviceId,
sourceRouter: sourceRouter,
clientId: clientId,
ctx: logcontext.NewContext(),
deadline: time.Now().Add(h.network.GetOptions().RouteTimeout),
}
}
type circuitParams struct {
serviceId string
sourceRouter *network.Router
clientId *identity.TokenId
ctx logcontext.Context
deadline time.Time
}
func (self *circuitParams) GetServiceId() string {
return self.serviceId
}
func (self *circuitParams) GetSourceRouter() *network.Router {
return self.sourceRouter
}
func (self *circuitParams) GetClientId() *identity.TokenId {
return self.clientId
}
func (self *circuitParams) GetCircuitTags(xt.CostedTerminator) map[string]string {
return map[string]string{
"serviceId": self.serviceId,
}
}
func (self *circuitParams) GetLogContext() logcontext.Context {
return self.ctx
}
func (self *circuitParams) GetDeadline() time.Time {
return self.deadline
}
+1 -1
View File
@@ -17,12 +17,12 @@
package handler_ctrl
import (
"github.com/golang/protobuf/proto"
"github.com/michaelquigley/pfxlog"
"github.com/openziti/channel"
"github.com/openziti/fabric/controller/network"
"github.com/openziti/fabric/handler_common"
"github.com/openziti/fabric/pb/ctrl_pb"
"google.golang.org/protobuf/proto"
)
type verifyRouterHandler struct {
+12
View File
@@ -19,7 +19,9 @@ package network
import (
"github.com/openziti/fabric/controller/idgen"
"github.com/openziti/fabric/controller/xt"
"github.com/openziti/fabric/logcontext"
"github.com/openziti/foundation/v2/concurrenz"
"github.com/openziti/identity"
"github.com/orcaman/concurrent-map/v2"
"time"
)
@@ -30,6 +32,7 @@ type Circuit struct {
Service *Service
Terminator xt.CostedTerminator
Path *Path
Tags map[string]string
Rerouting concurrenz.AtomicBoolean
PeerData xt.PeerData
CreatedAt time.Time
@@ -96,3 +99,12 @@ func (self *circuitController) all() []*Circuit {
func (self *circuitController) remove(circuit *Circuit) {
self.circuits.Remove(circuit.Id)
}
type CreateCircuitParams interface {
GetServiceId() string
GetSourceRouter() *Router
GetClientId() *identity.TokenId
GetCircuitTags(terminator xt.CostedTerminator) map[string]string
GetLogContext() logcontext.Context
GetDeadline() time.Time
}
-9
View File
@@ -1,7 +1,6 @@
package network
import (
"github.com/golang/protobuf/proto"
"github.com/openziti/fabric/controller/command"
"github.com/openziti/fabric/controller/db"
"github.com/openziti/fabric/controller/models"
@@ -10,14 +9,6 @@ import (
"testing"
)
func testFactory[T proto.Message](msgType T) func([]byte) (T, error) {
return func(b []byte) (T, error) {
var msg T = proto.MessageV1(proto.MessageV2(msgType).ProtoReflect().New()).(T)
err := proto.Unmarshal(b, msg)
return msg, err
}
}
func TestProtobufFactory(t *testing.T) {
ctx := db.NewTestContext(t)
defer ctx.Cleanup()
+12 -2
View File
@@ -407,7 +407,13 @@ func (network *Network) LinkChanged(l *Link) {
}()
}
func (network *Network) CreateCircuit(srcR *Router, clientId *identity.TokenId, service string, ctx logcontext.Context, deadline time.Time) (*Circuit, error) {
func (network *Network) CreateCircuit(params CreateCircuitParams) (*Circuit, error) {
srcR := params.GetSourceRouter()
clientId := params.GetClientId()
service := params.GetServiceId()
ctx := params.GetLogContext()
deadline := params.GetDeadline()
startTime := time.Now()
instanceId, serviceId := parseInstanceIdAndService(service)
@@ -453,15 +459,18 @@ func (network *Network) CreateCircuit(srcR *Router, clientId *identity.TokenId,
return nil, pathErr
}
// get circuit tags
tags := params.GetCircuitTags(terminator)
// 4a: Create Route Messages
rms := path.CreateRouteMessages(attempt, circuitId, terminator, deadline)
rms[len(rms)-1].Egress.PeerData = clientId.Data
for _, msg := range rms {
msg.Context = &ctrl_pb.Context{
Fields: ctx.GetStringFields(),
ChannelMask: ctx.GetChannelsMask(),
}
msg.Tags = tags
}
// 5: Routing
@@ -534,6 +543,7 @@ func (network *Network) CreateCircuit(srcR *Router, clientId *identity.TokenId,
Terminator: terminator,
PeerData: peerData,
CreatedAt: time.Now(),
Tags: tags,
}
network.circuitController.add(circuit)
creationTimespan := time.Since(startTime)
+4
View File
@@ -79,6 +79,10 @@ func (entity *Terminator) GetPeerData() xt.PeerData {
return entity.PeerData
}
func (entity *Terminator) GetHostId() string {
return entity.HostId
}
func (entity *Terminator) toBolt() *db.Terminator {
precedence := xt.Precedences.Default.String()
if entity.Precedence != nil {
+1
View File
@@ -42,6 +42,7 @@ type Terminator interface {
GetAddress() string
GetPeerData() PeerData
GetCreatedAt() time.Time
GetHostId() string
}
type PeerData map[uint32][]byte
+29 -8
View File
@@ -8,14 +8,15 @@ const (
)
type UsageEvent struct {
Namespace string `json:"namespace"`
Version uint32 `json:"version"`
EventType string `json:"event_type"`
SourceId string `json:"source_id"`
CircuitId string `json:"circuit_id"`
Usage uint64 `json:"usage"`
IntervalStartUTC int64 `json:"interval_start_utc"`
IntervalLength uint64 `json:"interval_length"`
Namespace string `json:"namespace"`
Version uint32 `json:"version"`
EventType string `json:"event_type"`
SourceId string `json:"source_id"`
CircuitId string `json:"circuit_id"`
Usage uint64 `json:"usage"`
IntervalStartUTC int64 `json:"interval_start_utc"`
IntervalLength uint64 `json:"interval_length"`
Tags map[string]string `json:"tags"`
}
func (event *UsageEvent) String() string {
@@ -26,3 +27,23 @@ func (event *UsageEvent) String() string {
type UsageEventHandler interface {
AcceptUsageEvent(event *UsageEvent)
}
type UsageEventV3 struct {
Namespace string `json:"namespace"`
Version uint32 `json:"version"`
SourceId string `json:"source_id"`
CircuitId string `json:"circuit_id"`
Usage map[string]uint64 `json:"usage"`
IntervalStartUTC int64 `json:"interval_start_utc"`
IntervalLength uint64 `json:"interval_length"`
Tags map[string]string `json:"tags"`
}
func (event *UsageEventV3) String() string {
return fmt.Sprintf("source=%v session=%v usage=%v intervalStart=%v intervalLength=%v",
event.SourceId, event.CircuitId, event.Usage, event.IntervalStartUTC, event.IntervalLength)
}
type UsageEventV3Handler interface {
AcceptUsageEventV3(event *UsageEventV3)
}
+1
View File
@@ -57,6 +57,7 @@ type Dispatcher struct {
serviceEventHandlers concurrenz.CopyOnWriteSlice[event.ServiceEventHandler]
terminatorEventHandlers concurrenz.CopyOnWriteSlice[event.TerminatorEventHandler]
usageEventHandlers concurrenz.CopyOnWriteSlice[event.UsageEventHandler]
usageEventV3Handlers concurrenz.CopyOnWriteSlice[event.UsageEventV3Handler]
metricsMappers concurrenz.CopyOnWriteSlice[event.MetricsMapper]
+104 -14
View File
@@ -31,6 +31,14 @@ func (self *Dispatcher) RemoveUsageEventHandler(handler event.UsageEventHandler)
self.usageEventHandlers.Delete(handler)
}
func (self *Dispatcher) AddUsageEventV3Handler(handler event.UsageEventV3Handler) {
self.usageEventV3Handlers.Append(handler)
}
func (self *Dispatcher) RemoveUsageEventV3Handler(handler event.UsageEventV3Handler) {
self.usageEventV3Handlers.Delete(handler)
}
func (self *Dispatcher) AcceptUsageEvent(event *event.UsageEvent) {
go func() {
for _, handler := range self.usageEventHandlers.Value() {
@@ -39,13 +47,38 @@ func (self *Dispatcher) AcceptUsageEvent(event *event.UsageEvent) {
}()
}
func (self *Dispatcher) registerUsageEventHandler(val interface{}, _ map[interface{}]interface{}) error {
handler, ok := val.(event.UsageEventHandler)
if !ok {
return errors.Errorf("type %v doesn't implement github.com/openziti/fabric/event/UsageEventHandler interface.", reflect.TypeOf(val))
func (self *Dispatcher) AcceptUsageEventV3(event *event.UsageEventV3) {
go func() {
for _, handler := range self.usageEventV3Handlers.Value() {
handler.AcceptUsageEventV3(event)
}
}()
}
func (self *Dispatcher) registerUsageEventHandler(val interface{}, config map[interface{}]interface{}) error {
version := 2
if configVal, found := config["version"]; found {
if intVal, ok := configVal.(int); ok {
version = intVal
}
}
self.AddUsageEventHandler(handler)
if version == 2 {
handler, ok := val.(event.UsageEventHandler)
if !ok {
return errors.Errorf("type %v doesn't implement github.com/openziti/fabric/event/UsageEventHandler interface.", reflect.TypeOf(val))
}
self.AddUsageEventHandler(handler)
} else if version == 3 {
handler, ok := val.(event.UsageEventV3Handler)
if !ok {
return errors.Errorf("type %v doesn't implement github.com/openziti/fabric/event/UsageEventV3Handler interface.", reflect.TypeOf(val))
}
self.AddUsageEventV3Handler(handler)
} else {
return errors.Errorf("unsupported usage version: %v", version)
}
return nil
}
@@ -60,20 +93,77 @@ type usageEventAdapter struct {
}
func (self *usageEventAdapter) AcceptMetricsMsg(message *metrics_pb.MetricsMessage) {
for name, interval := range message.IntervalCounters {
for _, bucket := range interval.Buckets {
for circuitId, usage := range bucket.Values {
evt := &event.UsageEvent{
if len(self.dispatcher.usageEventHandlers.Value()) > 0 {
for name, interval := range message.IntervalCounters {
for _, bucket := range interval.Buckets {
for circuitId, usage := range bucket.Values {
evt := &event.UsageEvent{
Namespace: event.UsageEventsNs,
Version: event.UsageEventsVersion,
EventType: name,
SourceId: message.SourceId,
CircuitId: circuitId,
Usage: usage,
IntervalStartUTC: bucket.IntervalStartUTC,
IntervalLength: interval.IntervalLength,
}
self.dispatcher.AcceptUsageEvent(evt)
}
}
}
for _, interval := range message.UsageCounters {
for circuitId, bucket := range interval.Buckets {
for usageType, usage := range bucket.Values {
evt := &event.UsageEvent{
Namespace: event.UsageEventsNs,
Version: event.UsageEventsVersion,
EventType: "usage." + usageType,
SourceId: message.SourceId,
CircuitId: circuitId,
Usage: usage,
IntervalStartUTC: interval.IntervalStartUTC,
IntervalLength: interval.IntervalLength,
Tags: bucket.Tags,
}
self.dispatcher.AcceptUsageEvent(evt)
}
}
}
}
if len(self.dispatcher.usageEventV3Handlers.Value()) > 0 {
for name, interval := range message.IntervalCounters {
for _, bucket := range interval.Buckets {
for circuitId, usage := range bucket.Values {
evt := &event.UsageEventV3{
Namespace: event.UsageEventsNs,
Version: 3,
SourceId: message.SourceId,
CircuitId: circuitId,
Usage: map[string]uint64{
name: usage,
},
IntervalStartUTC: bucket.IntervalStartUTC,
IntervalLength: interval.IntervalLength,
}
self.dispatcher.AcceptUsageEventV3(evt)
}
}
}
for _, interval := range message.UsageCounters {
for circuitId, bucket := range interval.Buckets {
evt := &event.UsageEventV3{
Namespace: event.UsageEventsNs,
Version: event.UsageEventsVersion,
EventType: name,
Version: 3,
SourceId: message.SourceId,
CircuitId: circuitId,
Usage: usage,
IntervalStartUTC: bucket.IntervalStartUTC,
Usage: bucket.Values,
IntervalStartUTC: interval.IntervalStartUTC,
IntervalLength: interval.IntervalLength,
Tags: bucket.Tags,
}
self.dispatcher.AcceptUsageEvent(evt)
self.dispatcher.AcceptUsageEventV3(evt)
}
}
}
+21
View File
@@ -105,6 +105,12 @@ func (event *JsonUsageEvent) WriteTo(output io.Writer) error {
return marshalJson(event, output)
}
type JsonUsageEventV3 event.UsageEventV3
func (event *JsonUsageEventV3) WriteTo(output io.Writer) error {
return marshalJson(event, output)
}
func NewJsonFormatter(queueDepth int, output io.Writer) *JsonFormatter {
return &JsonFormatter{
BaseFormatter: BaseFormatter{
@@ -146,6 +152,10 @@ func (formatter *JsonFormatter) AcceptUsageEvent(evt *event.UsageEvent) {
formatter.AcceptLoggingEvent((*JsonUsageEvent)(evt))
}
func (formatter *JsonFormatter) AcceptUsageEventV3(evt *event.UsageEventV3) {
formatter.AcceptLoggingEvent((*JsonUsageEventV3)(evt))
}
type PlainTextCircuitEvent event.CircuitEvent
func (self *PlainTextCircuitEvent) WriteTo(output io.Writer) error {
@@ -182,6 +192,13 @@ func (self *PlainTextUsageEvent) WriteTo(output io.Writer) error {
return err
}
type PlainTextUsageEventV3 event.UsageEventV3
func (self *PlainTextUsageEventV3) WriteTo(output io.Writer) error {
_, err := output.Write([]byte((*event.UsageEventV3)(self).String()))
return err
}
type PlainTextServiceEvent event.ServiceEvent
func (self *PlainTextServiceEvent) WriteTo(output io.Writer) error {
@@ -244,6 +261,10 @@ func (formatter *PlainTextFormatter) AcceptUsageEvent(evt *event.UsageEvent) {
formatter.AcceptLoggingEvent((*PlainTextUsageEvent)(evt))
}
func (formatter *PlainTextFormatter) AcceptUsageEventV3(evt *event.UsageEventV3) {
formatter.AcceptLoggingEvent((*PlainTextUsageEventV3)(evt))
}
var histogramBuckets = map[string]string{"p50": "0.50", "p75": "0.75", "p95": "0.95", "p99": "0.99", "p999": "0.999", "p9999": "0.9999"}
type PrometheusMetricsEvent event.MetricsEvent
+154 -137
View File
@@ -1186,12 +1186,13 @@ type Route struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
CircuitId string `protobuf:"bytes,1,opt,name=circuitId,proto3" json:"circuitId,omitempty"`
Attempt uint32 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"`
Egress *Route_Egress `protobuf:"bytes,3,opt,name=egress,proto3" json:"egress,omitempty"`
Forwards []*Route_Forward `protobuf:"bytes,4,rep,name=forwards,proto3" json:"forwards,omitempty"`
Context *Context `protobuf:"bytes,5,opt,name=context,proto3" json:"context,omitempty"`
Timeout uint64 `protobuf:"varint,6,opt,name=timeout,proto3" json:"timeout,omitempty"`
CircuitId string `protobuf:"bytes,1,opt,name=circuitId,proto3" json:"circuitId,omitempty"`
Attempt uint32 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"`
Egress *Route_Egress `protobuf:"bytes,3,opt,name=egress,proto3" json:"egress,omitempty"`
Forwards []*Route_Forward `protobuf:"bytes,4,rep,name=forwards,proto3" json:"forwards,omitempty"`
Context *Context `protobuf:"bytes,5,opt,name=context,proto3" json:"context,omitempty"`
Timeout uint64 `protobuf:"varint,6,opt,name=timeout,proto3" json:"timeout,omitempty"`
Tags map[string]string `protobuf:"bytes,7,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *Route) Reset() {
@@ -1268,6 +1269,13 @@ func (x *Route) GetTimeout() uint64 {
return 0
}
func (x *Route) GetTags() map[string]string {
if x != nil {
return x.Tags
}
return nil
}
type Unroute struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1878,7 +1886,7 @@ type InspectResponse_InspectValue struct {
func (x *InspectResponse_InspectValue) Reset() {
*x = InspectResponse_InspectValue{}
if protoimpl.UnsafeEnabled {
mi := &file_ctrl_proto_msgTypes[30]
mi := &file_ctrl_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1891,7 +1899,7 @@ func (x *InspectResponse_InspectValue) String() string {
func (*InspectResponse_InspectValue) ProtoMessage() {}
func (x *InspectResponse_InspectValue) ProtoReflect() protoreflect.Message {
mi := &file_ctrl_proto_msgTypes[30]
mi := &file_ctrl_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2055,7 +2063,7 @@ var file_ctrl_proto_rawDesc = []byte{
0x73, 0x6b, 0x1a, 0x39, 0x0a, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd8, 0x04,
0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc4, 0x05,
0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x69, 0x72, 0x63, 0x75,
0x69, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x69, 0x72, 0x63,
0x75, 0x69, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74,
@@ -2071,120 +2079,127 @@ var file_ctrl_proto_rawDesc = []byte{
0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e,
0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x18, 0x0a,
0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07,
0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x1a, 0xe1, 0x01, 0x0a, 0x06, 0x45, 0x67, 0x72, 0x65,
0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07,
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73,
0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x08, 0x70, 0x65, 0x65, 0x72,
0x44, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x7a, 0x69, 0x74,
0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e,
0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x3b,
0x0a, 0x0d, 0x50, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x7b, 0x0a, 0x07, 0x46,
0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x72, 0x63, 0x41, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x72, 0x63, 0x41,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x73, 0x74, 0x41, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x73, 0x74, 0x41,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x07, 0x64, 0x73, 0x74, 0x54, 0x79, 0x70,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63,
0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52,
0x07, 0x64, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x39, 0x0a, 0x07, 0x55, 0x6e, 0x72, 0x6f,
0x75, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x49,
0x64, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03,
0x6e, 0x6f, 0x77, 0x22, 0x3a, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f,
0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22,
0xc1, 0x01, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01,
0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a,
0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65,
0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x42, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18,
0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72,
0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75,
0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x38, 0x0a, 0x0c, 0x49, 0x6e, 0x73,
0x70, 0x65, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x22, 0x48, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4c, 0x69, 0x6e,
0x6b, 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, 0x22, 0x0a, 0x0c, 0x66, 0x69, 0x6e,
0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52,
0x0c, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x4e, 0x0a,
0x0c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a,
0x08, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x08, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x69, 0x6e,
0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52,
0x0c, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x5c, 0x0a,
0x08, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72,
0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12,
0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
0x09, 0x52, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x22, 0x41, 0x0a, 0x09, 0x4c,
0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, 0x09, 0x6c, 0x69, 0x73, 0x74,
0x65, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x7a, 0x69,
0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65,
0x6e, 0x65, 0x72, 0x52, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x2a, 0x98,
0x04, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08,
0x0a, 0x04, 0x5a, 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x12, 0x43, 0x69, 0x72, 0x63,
0x75, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xe8,
0x07, 0x12, 0x0d, 0x0a, 0x08, 0x44, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x10, 0xea, 0x07,
0x12, 0x16, 0x0a, 0x11, 0x4c, 0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65,
0x64, 0x54, 0x79, 0x70, 0x65, 0x10, 0xeb, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x61, 0x75, 0x6c,
0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xec, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x52, 0x6f, 0x75, 0x74,
0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xed, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x55, 0x6e, 0x72, 0x6f,
0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xee, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x4d, 0x65,
0x74, 0x72, 0x69, 0x63, 0x73, 0x54, 0x79, 0x70, 0x65, 0x10, 0xef, 0x07, 0x12, 0x20, 0x0a, 0x1b,
0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x50, 0x69, 0x70, 0x65, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf0, 0x07, 0x12, 0x13,
0x0a, 0x0e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65,
0x10, 0xf2, 0x07, 0x12, 0x20, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x72,
0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79,
0x70, 0x65, 0x10, 0xf3, 0x07, 0x12, 0x20, 0x0a, 0x1b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54,
0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x54, 0x79, 0x70, 0x65, 0x10, 0xf4, 0x07, 0x12, 0x17, 0x0a, 0x12, 0x49, 0x6e, 0x73, 0x70, 0x65,
0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf5, 0x07,
0x12, 0x18, 0x0a, 0x13, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf6, 0x07, 0x12, 0x23, 0x0a, 0x1e, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf9, 0x07, 0x12,
0x20, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61,
0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xfa,
0x07, 0x12, 0x13, 0x0a, 0x0e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4c, 0x69, 0x6e, 0x6b, 0x54,
0x79, 0x70, 0x65, 0x10, 0xfb, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
0x67, 0x73, 0x54, 0x79, 0x70, 0x65, 0x10, 0xfc, 0x07, 0x12, 0x1c, 0x0a, 0x17, 0x43, 0x69, 0x72,
0x63, 0x75, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x54, 0x79, 0x70, 0x65, 0x10, 0x8a, 0x08, 0x12, 0x14, 0x0a, 0x0f, 0x52, 0x6f, 0x75, 0x74, 0x65,
0x72, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x54, 0x79, 0x70, 0x65, 0x10, 0x8b, 0x08, 0x12, 0x15, 0x0a,
0x10, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70,
0x65, 0x10, 0x8c, 0x08, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72,
0x73, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x10, 0x0a, 0x2a, 0x35, 0x0a, 0x0c, 0x53, 0x65, 0x74,
0x74, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x6e, 0x75,
0x73, 0x65, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e,
0x4e, 0x65, 0x77, 0x43, 0x74, 0x72, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x01,
0x2a, 0x3d, 0x0a, 0x14, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72,
0x65, 0x63, 0x65, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x65, 0x66, 0x61,
0x75, 0x6c, 0x74, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x2a,
0x52, 0x0a, 0x0c, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12,
0x10, 0x0a, 0x0c, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x10,
0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x46, 0x61, 0x75, 0x6c, 0x74,
0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x69, 0x6e, 0x6b, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x10,
0x02, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x46, 0x61, 0x75, 0x6c,
0x74, 0x10, 0x03, 0x2a, 0x28, 0x0a, 0x08, 0x44, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12,
0x09, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x72, 0x74, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x45, 0x6e,
0x64, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x10, 0x02, 0x42, 0x27, 0x5a,
0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e,
0x7a, 0x69, 0x74, 0x69, 0x2f, 0x66, 0x61, 0x62, 0x72, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x2f, 0x63,
0x74, 0x72, 0x6c, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18,
0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72,
0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x1a, 0xe1, 0x01, 0x0a, 0x06, 0x45,
0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12,
0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73,
0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x08, 0x70,
0x65, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e,
0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x6f, 0x75,
0x74, 0x65, 0x2e, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x44, 0x61,
0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74,
0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x65, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x7b,
0x0a, 0x07, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x72, 0x63,
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73,
0x72, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x73, 0x74,
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64,
0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x07, 0x64, 0x73, 0x74,
0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x7a, 0x69, 0x74,
0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x54, 0x79,
0x70, 0x65, 0x52, 0x07, 0x64, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x54,
0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x3a, 0x02, 0x38, 0x01, 0x22, 0x39, 0x0a, 0x07, 0x55, 0x6e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12,
0x1c, 0x0a, 0x09, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x49, 0x64, 0x12, 0x10, 0x0a,
0x03, 0x6e, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x6e, 0x6f, 0x77, 0x22,
0x3a, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x56, 0x61,
0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0xc1, 0x01, 0x0a, 0x0f,
0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72,
0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72,
0x73, 0x12, 0x42, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x2a, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63, 0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62,
0x2e, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x2e, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x38, 0x0a, 0x0c, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22,
0x48, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4c, 0x69, 0x6e, 0x6b, 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, 0x22, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70,
0x72, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x69, 0x6e,
0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x4e, 0x0a, 0x0c, 0x56, 0x65, 0x72,
0x69, 0x66, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x6f, 0x75,
0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x75,
0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70,
0x72, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x69, 0x6e,
0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x5c, 0x0a, 0x08, 0x4c, 0x69, 0x73,
0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12,
0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x63,
0x6f, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63,
0x6f, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x22, 0x41, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x65,
0x6e, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72,
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x7a, 0x69, 0x74, 0x69, 0x2e, 0x63,
0x74, 0x72, 0x6c, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52,
0x09, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x2a, 0x98, 0x04, 0x0a, 0x0b, 0x43,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x5a, 0x65,
0x72, 0x6f, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x12, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xe8, 0x07, 0x12, 0x0d, 0x0a,
0x08, 0x44, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x10, 0xea, 0x07, 0x12, 0x16, 0x0a, 0x11,
0x4c, 0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70,
0x65, 0x10, 0xeb, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70,
0x65, 0x10, 0xec, 0x07, 0x12, 0x0e, 0x0a, 0x09, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70,
0x65, 0x10, 0xed, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x55, 0x6e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x54,
0x79, 0x70, 0x65, 0x10, 0xee, 0x07, 0x12, 0x10, 0x0a, 0x0b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63,
0x73, 0x54, 0x79, 0x70, 0x65, 0x10, 0xef, 0x07, 0x12, 0x20, 0x0a, 0x1b, 0x54, 0x6f, 0x67, 0x67,
0x6c, 0x65, 0x50, 0x69, 0x70, 0x65, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf0, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x72,
0x61, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf2, 0x07, 0x12,
0x20, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61,
0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf3,
0x07, 0x12, 0x20, 0x0a, 0x1b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69,
0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65,
0x10, 0xf4, 0x07, 0x12, 0x17, 0x0a, 0x12, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf5, 0x07, 0x12, 0x18, 0x0a, 0x13,
0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54,
0x79, 0x70, 0x65, 0x10, 0xf6, 0x07, 0x12, 0x23, 0x0a, 0x1e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61,
0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xf9, 0x07, 0x12, 0x20, 0x0a, 0x1b, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x10, 0xfa, 0x07, 0x12, 0x13, 0x0a,
0x0e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4c, 0x69, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x10,
0xfb, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x54, 0x79,
0x70, 0x65, 0x10, 0xfc, 0x07, 0x12, 0x1c, 0x0a, 0x17, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65,
0x10, 0x8a, 0x08, 0x12, 0x14, 0x0a, 0x0f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x4c, 0x69, 0x6e,
0x6b, 0x73, 0x54, 0x79, 0x70, 0x65, 0x10, 0x8b, 0x08, 0x12, 0x15, 0x0a, 0x10, 0x56, 0x65, 0x72,
0x69, 0x66, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x10, 0x8c, 0x08,
0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x48, 0x65, 0x61,
0x64, 0x65, 0x72, 0x10, 0x0a, 0x2a, 0x35, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x53,
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4e, 0x65, 0x77, 0x43,
0x74, 0x72, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x01, 0x2a, 0x3d, 0x0a, 0x14,
0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x65, 0x63, 0x65, 0x64,
0x65, 0x6e, 0x63, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x10,
0x00, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12,
0x0a, 0x0a, 0x06, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x2a, 0x52, 0x0a, 0x0c, 0x46,
0x61, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x10, 0x0a, 0x0c, 0x49,
0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x00, 0x12, 0x0f, 0x0a,
0x0b, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x01, 0x12, 0x0d,
0x0a, 0x09, 0x4c, 0x69, 0x6e, 0x6b, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x02, 0x12, 0x10, 0x0a,
0x0c, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x10, 0x03, 0x2a,
0x28, 0x0a, 0x08, 0x44, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53,
0x74, 0x61, 0x72, 0x74, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x45, 0x6e, 0x64, 0x10, 0x01, 0x12,
0x08, 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x10, 0x02, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x7a, 0x69, 0x74, 0x69,
0x2f, 0x66, 0x61, 0x62, 0x72, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x74, 0x72, 0x6c, 0x5f,
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -2200,7 +2215,7 @@ func file_ctrl_proto_rawDescGZIP() []byte {
}
var file_ctrl_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
var file_ctrl_proto_msgTypes = make([]protoimpl.MessageInfo, 31)
var file_ctrl_proto_msgTypes = make([]protoimpl.MessageInfo, 32)
var file_ctrl_proto_goTypes = []interface{}{
(ContentType)(0), // 0: ziti.ctrl.pb.ContentType
(SettingTypes)(0), // 1: ziti.ctrl.pb.SettingTypes
@@ -2236,8 +2251,9 @@ var file_ctrl_proto_goTypes = []interface{}{
nil, // 31: ziti.ctrl.pb.Context.FieldsEntry
(*Route_Egress)(nil), // 32: ziti.ctrl.pb.Route.Egress
(*Route_Forward)(nil), // 33: ziti.ctrl.pb.Route.Forward
nil, // 34: ziti.ctrl.pb.Route.Egress.PeerDataEntry
(*InspectResponse_InspectValue)(nil), // 35: ziti.ctrl.pb.InspectResponse.InspectValue
nil, // 34: ziti.ctrl.pb.Route.TagsEntry
nil, // 35: ziti.ctrl.pb.Route.Egress.PeerDataEntry
(*InspectResponse_InspectValue)(nil), // 36: ziti.ctrl.pb.InspectResponse.InspectValue
}
var file_ctrl_proto_depIdxs = []int32{
27, // 0: ziti.ctrl.pb.Settings.data:type_name -> ziti.ctrl.pb.Settings.DataEntry
@@ -2253,15 +2269,16 @@ var file_ctrl_proto_depIdxs = []int32{
32, // 10: ziti.ctrl.pb.Route.egress:type_name -> ziti.ctrl.pb.Route.Egress
33, // 11: ziti.ctrl.pb.Route.forwards:type_name -> ziti.ctrl.pb.Route.Forward
18, // 12: ziti.ctrl.pb.Route.context:type_name -> ziti.ctrl.pb.Context
35, // 13: ziti.ctrl.pb.InspectResponse.values:type_name -> ziti.ctrl.pb.InspectResponse.InspectValue
25, // 14: ziti.ctrl.pb.Listeners.listeners:type_name -> ziti.ctrl.pb.Listener
34, // 15: ziti.ctrl.pb.Route.Egress.peerData:type_name -> ziti.ctrl.pb.Route.Egress.PeerDataEntry
4, // 16: ziti.ctrl.pb.Route.Forward.dstType:type_name -> ziti.ctrl.pb.DestType
17, // [17:17] is the sub-list for method output_type
17, // [17:17] is the sub-list for method input_type
17, // [17:17] is the sub-list for extension type_name
17, // [17:17] is the sub-list for extension extendee
0, // [0:17] is the sub-list for field type_name
34, // 13: ziti.ctrl.pb.Route.tags:type_name -> ziti.ctrl.pb.Route.TagsEntry
36, // 14: ziti.ctrl.pb.InspectResponse.values:type_name -> ziti.ctrl.pb.InspectResponse.InspectValue
25, // 15: ziti.ctrl.pb.Listeners.listeners:type_name -> ziti.ctrl.pb.Listener
35, // 16: ziti.ctrl.pb.Route.Egress.peerData:type_name -> ziti.ctrl.pb.Route.Egress.PeerDataEntry
4, // 17: ziti.ctrl.pb.Route.Forward.dstType:type_name -> ziti.ctrl.pb.DestType
18, // [18:18] is the sub-list for method output_type
18, // [18:18] is the sub-list for method input_type
18, // [18:18] is the sub-list for extension type_name
18, // [18:18] is the sub-list for extension extendee
0, // [0:18] is the sub-list for field type_name
}
func init() { file_ctrl_proto_init() }
@@ -2570,7 +2587,7 @@ func file_ctrl_proto_init() {
return nil
}
}
file_ctrl_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
file_ctrl_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InspectResponse_InspectValue); i {
case 0:
return &v.state
@@ -2589,7 +2606,7 @@ func file_ctrl_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_ctrl_proto_rawDesc,
NumEnums: 5,
NumMessages: 31,
NumMessages: 32,
NumExtensions: 0,
NumServices: 0,
},
+1
View File
@@ -169,6 +169,7 @@ message Route {
repeated Forward forwards = 4;
Context context = 5;
uint64 timeout = 6;
map<string, string> tags = 7;
}
message Unroute {
+48 -3
View File
@@ -157,8 +157,6 @@ func (rh *routeHandler) connectEgress(msg *channel.Message, attempt int, ch chan
if factory, err := xgress.GlobalRegistry().Factory(route.Egress.Binding); err == nil {
if dialer, err := factory.CreateDialer(rh.dialerCfg[route.Egress.Binding]); err == nil {
circuitId := &identity.TokenId{Token: route.CircuitId, Data: route.Egress.PeerData}
bindHandler := handler_xgress.NewBindHandler(
handler_xgress.NewReceiveHandler(rh.forwarder),
handler_xgress.NewCloseHandler(rh.ctrl, rh.forwarder),
@@ -169,7 +167,8 @@ func (rh *routeHandler) connectEgress(msg *channel.Message, attempt int, ch chan
time.Sleep(rh.forwarder.Options.XgressDialDwellTime)
}
if peerData, err := dialer.Dial(route.Egress.Destination, circuitId, xgress.Address(route.Egress.Address), bindHandler, ctx, deadline); err == nil {
params := newDialParams(route, bindHandler, ctx, deadline)
if peerData, err := dialer.Dial(params); err == nil {
rh.completeRoute(msg, attempt, route, peerData, log)
} else {
var errCode byte
@@ -198,3 +197,49 @@ func (rh *routeHandler) connectEgress(msg *channel.Message, attempt int, ch chan
rh.fail(msg, attempt, route, errors.Wrapf(err, "error creating route for [c/%s]", route.CircuitId), errCode, log)
}
}
func newDialParams(route *ctrl_pb.Route, bindHandler xgress.BindHandler, logContext logcontext.Context, deadline time.Time) *dialParams {
return &dialParams{
Route: route,
circuitId: &identity.TokenId{Token: route.CircuitId, Data: route.Egress.PeerData},
bindHandler: bindHandler,
logContext: logContext,
deadline: deadline,
}
}
type dialParams struct {
*ctrl_pb.Route
circuitId *identity.TokenId
bindHandler xgress.BindHandler
logContext logcontext.Context
deadline time.Time
}
func (self *dialParams) GetDestination() string {
return self.Egress.Destination
}
func (self *dialParams) GetCircuitId() *identity.TokenId {
return self.circuitId
}
func (self *dialParams) GetAddress() xgress.Address {
return xgress.Address(self.Egress.Address)
}
func (self *dialParams) GetBindHandler() xgress.BindHandler {
return self.bindHandler
}
func (self *dialParams) GetLogContext() logcontext.Context {
return self.logContext
}
func (self *dialParams) GetDeadline() time.Time {
return self.deadline
}
func (self *dialParams) GetCircuitTags() map[string]string {
return self.Tags
}
+24 -22
View File
@@ -41,8 +41,7 @@ func NewChannelPeekHandler(linkId string, registry metrics.UsageRegistry) channe
linkRxMsgMeter := registry.Meter("link." + linkId + ".rx.msgrate")
linkRxMsgSizeHistogram := registry.Histogram("link." + linkId + ".rx.msgsize")
usageRxCounter := registry.IntervalCounter("usage.fabric.rx", time.Minute)
usageTxCounter := registry.IntervalCounter("usage.fabric.tx", time.Minute)
usageCounter := registry.UsageCounter("fabricUsage", time.Minute)
closeHook := func() {
linkTxBytesMeter.Dispose()
@@ -67,8 +66,7 @@ func NewChannelPeekHandler(linkId string, registry metrics.UsageRegistry) channe
linkRxBytesMeter: linkRxBytesMeter,
linkRxMsgMeter: linkRxMsgMeter,
linkRxMsgSizeHistogram: linkRxMsgSizeHistogram,
usageRxCounter: usageRxCounter,
usageTxCounter: usageTxCounter,
usageCounter: usageCounter,
closeHook: closeHook,
}
}
@@ -89,8 +87,7 @@ type channelPeekHandler struct {
linkTxMsgSizeHistogram metrics.Histogram
linkRxMsgSizeHistogram metrics.Histogram
usageRxCounter metrics.IntervalCounter
usageTxCounter metrics.IntervalCounter
usageCounter metrics.UsageCounter
closeHook func()
}
@@ -109,9 +106,9 @@ func (h *channelPeekHandler) Rx(msg *channel.Message, _ channel.Channel) {
if msg.ContentType == int32(xgress.ContentTypePayloadType) {
if payload, err := xgress.UnmarshallPayload(msg); err != nil {
pfxlog.Logger().Errorf("Failed to unmarshal payload. Error: %v", err)
pfxlog.Logger().WithError(err).Error("Failed to unmarshal payload")
} else {
h.usageRxCounter.Update(payload.CircuitId, time.Now(), uint64(len(payload.Data)))
h.usageCounter.Update(circuitUsageSource(payload.CircuitId), "fabric.rx", time.Now(), uint64(len(payload.Data)))
}
}
}
@@ -127,9 +124,9 @@ func (h *channelPeekHandler) Tx(msg *channel.Message, _ channel.Channel) {
if msg.ContentType == int32(xgress.ContentTypePayloadType) {
if payload, err := xgress.UnmarshallPayload(msg); err != nil {
pfxlog.Logger().Errorf("Failed to unmarshal payload. Error: %v", err)
pfxlog.Logger().WithError(err).Error("Failed to unmarshal payload")
} else {
h.usageTxCounter.Update(payload.CircuitId, time.Now(), uint64(len(payload.Data)))
h.usageCounter.Update(circuitUsageSource(payload.CircuitId), "fabric.tx", time.Now(), uint64(len(payload.Data)))
}
}
}
@@ -171,13 +168,20 @@ func NewXgressPeekHandler(registry metrics.UsageRegistry) xgress.PeekHandler {
egressTxMsgSizeHistogram: egressTxMsgSizeHistogram,
egressRxMsgSizeHistogram: egressRxMsgSizeHistogram,
ingressRxUsageCounter: registry.IntervalCounter("usage.ingress.rx", time.Minute),
ingressTxUsageCounter: registry.IntervalCounter("usage.ingress.tx", time.Minute),
egressRxUsageCounter: registry.IntervalCounter("usage.egress.rx", time.Minute),
egressTxUsageCounter: registry.IntervalCounter("usage.egress.tx", time.Minute),
usageCounter: registry.UsageCounter("usage", time.Minute),
}
}
type circuitUsageSource string
func (c circuitUsageSource) GetIntervalId() string {
return string(c)
}
func (c circuitUsageSource) GetTags() map[string]string {
return nil
}
type xgressPeekHandler struct {
ingressTxBytesMeter metrics.Meter
ingressTxMsgMeter metrics.Meter
@@ -193,21 +197,18 @@ type xgressPeekHandler struct {
egressTxMsgSizeHistogram metrics.Histogram
egressRxMsgSizeHistogram metrics.Histogram
ingressRxUsageCounter metrics.IntervalCounter
ingressTxUsageCounter metrics.IntervalCounter
egressRxUsageCounter metrics.IntervalCounter
egressTxUsageCounter metrics.IntervalCounter
usageCounter metrics.UsageCounter
}
func (handler *xgressPeekHandler) Rx(x *xgress.Xgress, payload *xgress.Payload) {
msgSize := int64(len(payload.Data))
if x.Originator() == xgress.Initiator {
handler.ingressRxUsageCounter.Update(x.CircuitId(), time.Now(), uint64(msgSize))
handler.usageCounter.Update(x, "ingress.rx", time.Now(), uint64(msgSize))
handler.ingressRxMsgMeter.Mark(1)
handler.ingressRxBytesMeter.Mark(msgSize)
handler.ingressRxMsgSizeHistogram.Update(msgSize)
} else {
handler.egressRxUsageCounter.Update(x.CircuitId(), time.Now(), uint64(msgSize))
handler.usageCounter.Update(x, "egress.rx", time.Now(), uint64(msgSize))
handler.egressRxMsgMeter.Mark(1)
handler.egressRxBytesMeter.Mark(msgSize)
handler.egressRxMsgSizeHistogram.Update(msgSize)
@@ -217,12 +218,13 @@ func (handler *xgressPeekHandler) Rx(x *xgress.Xgress, payload *xgress.Payload)
func (handler *xgressPeekHandler) Tx(x *xgress.Xgress, payload *xgress.Payload) {
msgSize := int64(len(payload.Data))
if x.Originator() == xgress.Initiator {
handler.ingressTxUsageCounter.Update(x.CircuitId(), time.Now(), uint64(msgSize))
handler.usageCounter.Update(x, "ingress.tx", time.Now(), uint64(msgSize))
handler.ingressTxMsgMeter.Mark(1)
handler.ingressTxBytesMeter.Mark(msgSize)
handler.ingressTxMsgSizeHistogram.Update(msgSize)
} else {
handler.egressTxUsageCounter.Update(x.CircuitId(), time.Now(), uint64(msgSize))
handler.usageCounter.Update(x, "egress.tx", time.Now(), uint64(msgSize))
handler.egressTxMsgMeter.Mark(1)
handler.egressTxBytesMeter.Mark(msgSize)
handler.egressTxMsgSizeHistogram.Update(msgSize)
+1 -1
View File
@@ -73,7 +73,7 @@ func Test_Ordering(t *testing.T) {
closeNotify: make(chan struct{}),
}
x := NewXgress(&identity.TokenId{Token: "test"}, "test", conn, Initiator, DefaultOptions())
x := NewXgress(&identity.TokenId{Token: "test"}, "test", conn, Initiator, DefaultOptions(), nil)
x.receiveHandler = noopReceiveHandler{}
go x.tx()
+3 -1
View File
@@ -191,7 +191,9 @@ func CreateCircuit(ctrl CtrlChannel, peer Connection, request *Request, bindHand
return &Response{Success: false, Message: err.Error()}
}
x := NewXgress(circuitInfo.CircuitId, circuitInfo.Address, peer, Initiator, options)
x := NewXgress(circuitInfo.CircuitId, circuitInfo.Address, peer, Initiator, options, map[string]string{
"serviceId": request.ServiceId,
})
bindHandler.HandleXgressBind(x)
x.Start()
+22 -2
View File
@@ -56,8 +56,18 @@ type Listener interface {
Close() error
}
type DialParams interface {
GetDestination() string
GetCircuitId() *identity.TokenId
GetAddress() Address
GetBindHandler() BindHandler
GetLogContext() logcontext.Context
GetDeadline() time.Time
GetCircuitTags() map[string]string
}
type Dialer interface {
Dial(destination string, circuitId *identity.TokenId, address Address, bindHandler BindHandler, context logcontext.Context, deadline time.Time) (xt.PeerData, error)
Dial(params DialParams) (xt.PeerData, error)
IsTerminatorValid(id string, destination string) bool
}
@@ -132,9 +142,18 @@ type Xgress struct {
peekHandlers []PeekHandler
flags concurrenz.AtomicBitSet
timeOfLastRxFromLink int64
tags map[string]string
}
func NewXgress(circuitId *identity.TokenId, address Address, peer Connection, originator Originator, options *Options) *Xgress {
func (self *Xgress) GetIntervalId() string {
return self.circuitId
}
func (self *Xgress) GetTags() map[string]string {
return self.tags
}
func NewXgress(circuitId *identity.TokenId, address Address, peer Connection, originator Originator, options *Options, tags map[string]string) *Xgress {
result := &Xgress{
circuitId: circuitId.Token,
address: address,
@@ -146,6 +165,7 @@ func NewXgress(circuitId *identity.TokenId, address Address, peer Connection, or
rxSequence: 0,
linkRxBuffer: NewLinkReceiveBuffer(),
timeOfLastRxFromLink: info.NowInMilliseconds(),
tags: tags,
}
result.payloadBuffer = NewLinkSendBuffer(result)
return result
+8 -5
View File
@@ -50,8 +50,11 @@ func newDialer(id *identity.TokenId, ctrl xgress.CtrlChannel, options *xgress.Op
return txd, nil
}
func (txd *dialer) Dial(destination string, circuitId *identity.TokenId, address xgress.Address, bindHandler xgress.BindHandler, ctx logcontext.Context, deadline time.Time) (xt.PeerData, error) {
log := pfxlog.ChannelLogger(logcontext.EstablishPath).Wire(ctx).
func (txd *dialer) Dial(params xgress.DialParams) (xt.PeerData, error) {
destination := params.GetDestination()
circuitId := params.GetCircuitId()
log := pfxlog.ChannelLogger(logcontext.EstablishPath).Wire(params.GetLogContext()).
WithField("binding", "transport").
WithField("destination", destination)
@@ -63,7 +66,7 @@ func (txd *dialer) Dial(destination string, circuitId *identity.TokenId, address
log.Debug("dialing")
to := txd.options.ConnectTimeout
timeToDeadline := time.Until(deadline)
timeToDeadline := time.Until(params.GetDeadline())
if timeToDeadline > 0 && timeToDeadline < to {
to = timeToDeadline
}
@@ -75,8 +78,8 @@ func (txd *dialer) Dial(destination string, circuitId *identity.TokenId, address
log.Infof("successful connection to %v from %v", destination, peer.LocalAddr())
conn := &transportXgressConn{Conn: peer}
x := xgress.NewXgress(circuitId, address, conn, xgress.Terminator, txd.options)
bindHandler.HandleXgressBind(x)
x := xgress.NewXgress(circuitId, params.GetAddress(), conn, xgress.Terminator, txd.options, params.GetCircuitTags())
params.GetBindHandler().HandleXgressBind(x)
x.Start()
peerData := xt.PeerData{
+9 -5
View File
@@ -29,8 +29,12 @@ import (
"github.com/openziti/identity"
)
func (txd *dialer) Dial(destination string, circuitId *identity.TokenId, address xgress.Address, bindHandler xgress.BindHandler, ctx logcontext.Context, deadline time.Time) (xt.PeerData, error) {
log := pfxlog.ChannelLogger(logcontext.EstablishPath).Wire(ctx).
func (txd *dialer) Dial(params xgress.DialParams) (xt.PeerData, error) {
destination := params.GetDestination()
circuitId := params.GetCircuitId()
address := params.GetAddress()
log := pfxlog.ChannelLogger(logcontext.EstablishPath).Wire(params.GetLogContext()).
WithField("binding", "transport_udp").
WithField("destination", destination)
@@ -41,7 +45,7 @@ func (txd *dialer) Dial(destination string, circuitId *identity.TokenId, address
}
log.Debugf("dialing packet address [%v]", packetAddress)
deadlineTo := time.Until(deadline)
deadlineTo := time.Until(params.GetDeadline())
var conn net.Conn
if deadlineTo > 0 {
conn, err = net.DialTimeout(packetAddress.Network(), packetAddress.Address(), deadlineTo)
@@ -54,8 +58,8 @@ func (txd *dialer) Dial(destination string, circuitId *identity.TokenId, address
log.Infof("bound on [%v]", conn.LocalAddr())
x := xgress.NewXgress(circuitId, address, newPacketConn(conn), xgress.Terminator, txd.options)
bindHandler.HandleXgressBind(x)
x := xgress.NewXgress(circuitId, address, newPacketConn(conn), xgress.Terminator, txd.options, params.GetCircuitTags())
params.GetBindHandler().HandleXgressBind(x)
x.Start()
return nil, nil
+1 -1
View File
@@ -1 +1 @@
0.19
0.20