mirror of https://github.com/status-im/consul.git
Add support for downstreams
Enhance config by adding SocketPath and LocalSocketPath config values Supports syntax of the form: ``` services { name = "sock_forwarder" id = "sock_forwarder.1" socket_path = "/tmp/downstream_3.sock" connect { sidecar_service { proxy { local_service_socket_path = "/tmp/downstream.sock" } } } } ``` Signed-off-by: Mark Anderson <manderson@hashicorp.com>
This commit is contained in:
parent
6be9cebad0
commit
8040f91a43
|
@ -1641,6 +1641,14 @@ func (b *builder) serviceVal(v *ServiceDefinition) *structs.ServiceDefinition {
|
|||
if err := structs.ValidateWeights(serviceWeights); err != nil {
|
||||
b.err = multierror.Append(fmt.Errorf("Invalid weight definition for service %s: %s", stringVal(v.Name), err))
|
||||
}
|
||||
|
||||
if (v.Port != nil || v.Address != nil) && (v.SocketPath != nil) {
|
||||
b.err = multierror.Append(
|
||||
fmt.Errorf("service %s cannot have both socket path %s and address/port",
|
||||
stringVal(v.Name), stringVal(v.SocketPath)), b.err)
|
||||
|
||||
}
|
||||
|
||||
return &structs.ServiceDefinition{
|
||||
Kind: kind,
|
||||
ID: stringVal(v.ID),
|
||||
|
@ -1650,6 +1658,7 @@ func (b *builder) serviceVal(v *ServiceDefinition) *structs.ServiceDefinition {
|
|||
TaggedAddresses: b.svcTaggedAddresses(v.TaggedAddresses),
|
||||
Meta: meta,
|
||||
Port: intVal(v.Port),
|
||||
SocketPath: stringVal(v.SocketPath),
|
||||
Token: stringVal(v.Token),
|
||||
EnableTagOverride: boolVal(v.EnableTagOverride),
|
||||
Weights: serviceWeights,
|
||||
|
@ -1688,6 +1697,7 @@ func (b *builder) serviceProxyVal(v *ServiceProxy) *structs.ConnectProxyConfig {
|
|||
DestinationServiceID: stringVal(v.DestinationServiceID),
|
||||
LocalServiceAddress: stringVal(v.LocalServiceAddress),
|
||||
LocalServicePort: intVal(v.LocalServicePort),
|
||||
LocalServiceSocketPath: stringVal(&v.LocalServiceSocketPath),
|
||||
Config: v.Config,
|
||||
Upstreams: b.upstreamsVal(v.Upstreams),
|
||||
MeshGateway: b.meshGatewayConfVal(v.MeshGateway),
|
||||
|
|
|
@ -375,6 +375,7 @@ type ServiceDefinition struct {
|
|||
TaggedAddresses map[string]ServiceAddress `mapstructure:"tagged_addresses"`
|
||||
Meta map[string]string `mapstructure:"meta"`
|
||||
Port *int `mapstructure:"port"`
|
||||
SocketPath *string `mapstructure:"socket_path"`
|
||||
Check *CheckDefinition `mapstructure:"check"`
|
||||
Checks []CheckDefinition `mapstructure:"checks"`
|
||||
Token *string `mapstructure:"token"`
|
||||
|
@ -461,6 +462,10 @@ type ServiceProxy struct {
|
|||
// (DestinationServiceID is set) but otherwise will be ignored.
|
||||
LocalServicePort *int `mapstructure:"local_service_port"`
|
||||
|
||||
// LocalServiceSocketPath is the socket of the local service instance. It is optional
|
||||
// and should only be specified for "side-car" style proxies.
|
||||
LocalServiceSocketPath string `mapstructure:"local_service_socket_path"`
|
||||
|
||||
// TransparentProxy configuration.
|
||||
TransparentProxy *TransparentProxyConfig `mapstructure:"transparent_proxy"`
|
||||
|
||||
|
@ -514,7 +519,7 @@ type Upstream struct {
|
|||
// destined for this upstream service. Required.
|
||||
LocalBindPort *int `mapstructure:"local_bind_port"`
|
||||
|
||||
// These are exclusive with LocalBindAddress/LocalBindPort
|
||||
// These are exclusive with LocalBindAddress/LocalBindPort. These are created under our control.
|
||||
LocalBindSocketPath *string `mapstructure:"local_bind_socket_path"`
|
||||
LocalBindSocketMode *string `mapstructure:"local_bind_socket_mode"`
|
||||
|
||||
|
|
|
@ -362,6 +362,7 @@ service = {
|
|||
address = "cOlSOhbp"
|
||||
token = "msy7iWER"
|
||||
port = 24237
|
||||
socket_path = "/tmp/rc78ap"
|
||||
weights = {
|
||||
passing = 100,
|
||||
warning = 1
|
||||
|
@ -455,6 +456,7 @@ services = [
|
|||
address = "9RhqPSPB"
|
||||
token = "myjKJkWH"
|
||||
port = 72219
|
||||
socket_path = "/foo/bar/sock_7IszXMQ1"
|
||||
enable_tag_override = true
|
||||
check = {
|
||||
id = "qmfeO5if"
|
||||
|
@ -561,6 +563,7 @@ services = [
|
|||
destination_service_id = "6L6BVfgH-id"
|
||||
local_service_address = "127.0.0.2"
|
||||
local_service_port = 23759
|
||||
local_service_socket_path = "/foo/bar/local"
|
||||
config {
|
||||
cedGGtZf = "pWrUNiWw"
|
||||
}
|
||||
|
|
|
@ -358,6 +358,7 @@
|
|||
"address": "cOlSOhbp",
|
||||
"token": "msy7iWER",
|
||||
"port": 24237,
|
||||
"socket_path": "/tmp/rc78ap",
|
||||
"weights": {
|
||||
"passing": 100,
|
||||
"warning": 1
|
||||
|
@ -452,6 +453,7 @@
|
|||
"address": "9RhqPSPB",
|
||||
"token": "myjKJkWH",
|
||||
"port": 72219,
|
||||
"socket_path":"/foo/bar/sock_7IszXMQ1",
|
||||
"enable_tag_override": true,
|
||||
"check": {
|
||||
"id": "qmfeO5if",
|
||||
|
|
|
@ -98,11 +98,20 @@ func (a *Agent) sidecarServiceFromNodeService(ns *structs.NodeService, token str
|
|||
if sidecar.Proxy.DestinationServiceID == "" {
|
||||
sidecar.Proxy.DestinationServiceID = ns.ID
|
||||
}
|
||||
if sidecar.Proxy.LocalServiceAddress == "" {
|
||||
sidecar.Proxy.LocalServiceAddress = "127.0.0.1"
|
||||
}
|
||||
if sidecar.Proxy.LocalServicePort < 1 {
|
||||
sidecar.Proxy.LocalServicePort = ns.Port
|
||||
|
||||
// Fill defaults from NodeService if none of the address components are present.
|
||||
// This really argues for a refactoring to a more generalized 'address' concept.
|
||||
if sidecar.Proxy.LocalServiceSocketPath == "" && (sidecar.Proxy.LocalServiceAddress == "" || sidecar.Proxy.LocalServicePort < 1) {
|
||||
if ns.SocketPath != "" {
|
||||
sidecar.Proxy.LocalServiceSocketPath = ns.SocketPath
|
||||
} else {
|
||||
if sidecar.Proxy.LocalServiceAddress == "" {
|
||||
sidecar.Proxy.LocalServiceAddress = "127.0.0.1"
|
||||
}
|
||||
if sidecar.Proxy.LocalServicePort < 1 {
|
||||
sidecar.Proxy.LocalServicePort = ns.Port
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Allocate port if needed (min and max inclusive).
|
||||
|
|
|
@ -161,6 +161,10 @@ type ConnectProxyConfig struct {
|
|||
// (DestinationServiceID is set) but otherwise will be ignored.
|
||||
LocalServicePort int `json:",omitempty" alias:"local_service_port"`
|
||||
|
||||
// LocalServiceSocketPath is the socket of the local service instance. It is optional
|
||||
// and should only be specified for "side-car" style proxies.
|
||||
LocalServiceSocketPath string `json:",omitempty" alias:"local_service_socket_path"`
|
||||
|
||||
// Mode represents how the proxy's inbound and upstream listeners are dialed.
|
||||
Mode ProxyMode
|
||||
|
||||
|
@ -190,9 +194,9 @@ func (t *ConnectProxyConfig) UnmarshalJSON(data []byte) (err error) {
|
|||
DestinationServiceIDSnake string `json:"destination_service_id"`
|
||||
LocalServiceAddressSnake string `json:"local_service_address"`
|
||||
LocalServicePortSnake int `json:"local_service_port"`
|
||||
LocalServiceSocketPathSnake string `json:"local_service_socket_path"`
|
||||
MeshGatewaySnake MeshGatewayConfig `json:"mesh_gateway"`
|
||||
TransparentProxySnake TransparentProxyConfig `json:"transparent_proxy"`
|
||||
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(t),
|
||||
|
@ -212,6 +216,9 @@ func (t *ConnectProxyConfig) UnmarshalJSON(data []byte) (err error) {
|
|||
if t.LocalServicePort == 0 {
|
||||
t.LocalServicePort = aux.LocalServicePortSnake
|
||||
}
|
||||
if t.LocalServiceSocketPath == "" {
|
||||
t.LocalServiceSocketPath = aux.LocalServiceSocketPathSnake
|
||||
}
|
||||
if t.MeshGateway.Mode == "" {
|
||||
t.MeshGateway.Mode = aux.MeshGatewaySnake.Mode
|
||||
}
|
||||
|
@ -246,6 +253,7 @@ func (c *ConnectProxyConfig) ToAPI() *api.AgentServiceConnectProxyConfig {
|
|||
DestinationServiceID: c.DestinationServiceID,
|
||||
LocalServiceAddress: c.LocalServiceAddress,
|
||||
LocalServicePort: c.LocalServicePort,
|
||||
LocalServiceSocketPath: c.LocalServiceSocketPath,
|
||||
Mode: api.ProxyMode(c.Mode),
|
||||
TransparentProxy: c.TransparentProxy.ToAPI(),
|
||||
Config: c.Config,
|
||||
|
|
|
@ -16,6 +16,7 @@ type ServiceDefinition struct {
|
|||
TaggedAddresses map[string]ServiceAddress
|
||||
Meta map[string]string
|
||||
Port int
|
||||
SocketPath string
|
||||
Check CheckType
|
||||
Checks CheckTypes
|
||||
Weights *Weights
|
||||
|
@ -67,6 +68,7 @@ func (s *ServiceDefinition) NodeService() *NodeService {
|
|||
Address: s.Address,
|
||||
Meta: s.Meta,
|
||||
Port: s.Port,
|
||||
SocketPath: s.SocketPath,
|
||||
Weights: s.Weights,
|
||||
EnableTagOverride: s.EnableTagOverride,
|
||||
EnterpriseMeta: s.EnterpriseMeta,
|
||||
|
|
|
@ -807,10 +807,12 @@ type Services map[string][]string
|
|||
// in the state store and are filled in on the way out by parseServiceNodes().
|
||||
// This is also why PartialClone() skips them, because we know they are blank
|
||||
// already so it would be a waste of time to copy them.
|
||||
// This is somewhat complicated when the address is really a unix domain socket; technically that
|
||||
// will override the address field, but in practice the two use cases should not overlap.
|
||||
type ServiceNode struct {
|
||||
ID types.NodeID
|
||||
Node string
|
||||
Address string // TODO markan; this is slippery when we have sockets; the addr:path pattern falls apart.
|
||||
Address string
|
||||
Datacenter string
|
||||
TaggedAddresses map[string]string
|
||||
NodeMeta map[string]string
|
||||
|
@ -823,6 +825,7 @@ type ServiceNode struct {
|
|||
ServiceWeights Weights
|
||||
ServiceMeta map[string]string
|
||||
ServicePort int
|
||||
ServiceSocketPath string
|
||||
ServiceEnableTagOverride bool
|
||||
ServiceProxy ConnectProxyConfig
|
||||
ServiceConnect ServiceConnect
|
||||
|
@ -864,6 +867,7 @@ func (s *ServiceNode) PartialClone() *ServiceNode {
|
|||
ServiceName: s.ServiceName,
|
||||
ServiceTags: tags,
|
||||
ServiceAddress: s.ServiceAddress,
|
||||
ServiceSocketPath: s.ServiceSocketPath,
|
||||
ServiceTaggedAddresses: svcTaggedAddrs,
|
||||
ServicePort: s.ServicePort,
|
||||
ServiceMeta: nsmeta,
|
||||
|
@ -889,6 +893,7 @@ func (s *ServiceNode) ToNodeService() *NodeService {
|
|||
Address: s.ServiceAddress,
|
||||
TaggedAddresses: s.ServiceTaggedAddresses,
|
||||
Port: s.ServicePort,
|
||||
SocketPath: s.ServiceSocketPath,
|
||||
Meta: s.ServiceMeta,
|
||||
Weights: &s.ServiceWeights,
|
||||
EnableTagOverride: s.ServiceEnableTagOverride,
|
||||
|
@ -973,13 +978,11 @@ const (
|
|||
)
|
||||
|
||||
// Type to hold a address and port of a service
|
||||
// TODO markan, think about this around sockets
|
||||
type ServiceAddress struct {
|
||||
Address string
|
||||
Port int
|
||||
}
|
||||
|
||||
// TODO markan, think about this around sockets
|
||||
func (a ServiceAddress) ToAPIServiceAddress() api.ServiceAddress {
|
||||
return api.ServiceAddress{Address: a.Address, Port: a.Port}
|
||||
}
|
||||
|
@ -997,7 +1000,8 @@ type NodeService struct {
|
|||
Address string
|
||||
TaggedAddresses map[string]ServiceAddress `json:",omitempty"`
|
||||
Meta map[string]string
|
||||
Port int
|
||||
Port int `json:",omitempty"`
|
||||
SocketPath string `json:",omitempty"` // TODO This might be integrated into Address somehow, but not sure about the ergonomics. Only one of (address,port) or socketpath can be defined.
|
||||
Weights *Weights
|
||||
EnableTagOverride bool
|
||||
|
||||
|
@ -1160,9 +1164,9 @@ func (s *NodeService) Validate() error {
|
|||
"services"))
|
||||
}
|
||||
|
||||
if s.Port == 0 {
|
||||
if s.Port == 0 && s.SocketPath == "" {
|
||||
result = multierror.Append(result, fmt.Errorf(
|
||||
"Port must be set for a Connect proxy"))
|
||||
"Port or SocketPath must be set for a Connect proxy"))
|
||||
}
|
||||
|
||||
if s.Connect.Native {
|
||||
|
@ -1263,6 +1267,10 @@ func (s *NodeService) Validate() error {
|
|||
result = multierror.Append(result, fmt.Errorf("The Proxy.LocalServicePort configuration is invalid for a %s", s.Kind))
|
||||
}
|
||||
|
||||
if s.Proxy.LocalServiceSocketPath != "" {
|
||||
result = multierror.Append(result, fmt.Errorf("The Proxy.LocalServiceSocketPath configuration is invalid for a %s", s.Kind))
|
||||
}
|
||||
|
||||
if len(s.Proxy.Upstreams) != 0 {
|
||||
result = multierror.Append(result, fmt.Errorf("The Proxy.Upstreams configuration is invalid for a %s", s.Kind))
|
||||
}
|
||||
|
@ -1296,6 +1304,7 @@ func (s *NodeService) IsSame(other *NodeService) bool {
|
|||
!reflect.DeepEqual(s.Tags, other.Tags) ||
|
||||
s.Address != other.Address ||
|
||||
s.Port != other.Port ||
|
||||
s.SocketPath != other.SocketPath ||
|
||||
!reflect.DeepEqual(s.TaggedAddresses, other.TaggedAddresses) ||
|
||||
!reflect.DeepEqual(s.Weights, other.Weights) ||
|
||||
!reflect.DeepEqual(s.Meta, other.Meta) ||
|
||||
|
@ -1367,6 +1376,7 @@ func (s *NodeService) ToServiceNode(node string) *ServiceNode {
|
|||
ServiceAddress: s.Address,
|
||||
ServiceTaggedAddresses: s.TaggedAddresses,
|
||||
ServicePort: s.Port,
|
||||
ServiceSocketPath: s.SocketPath,
|
||||
ServiceMeta: s.Meta,
|
||||
ServiceWeights: theWeights,
|
||||
ServiceEnableTagOverride: s.EnableTagOverride,
|
||||
|
|
|
@ -400,10 +400,17 @@ func (s *ResourceGenerator) makeAppCluster(cfgSnap *proxycfg.ConfigSnapshot, nam
|
|||
return makeClusterFromUserConfig(cfg.LocalClusterJSON)
|
||||
}
|
||||
|
||||
addr := cfgSnap.Proxy.LocalServiceAddress
|
||||
if addr == "" {
|
||||
addr = "127.0.0.1"
|
||||
var endpoint *envoy_endpoint_v3.LbEndpoint
|
||||
if cfgSnap.Proxy.LocalServiceSocketPath != "" {
|
||||
endpoint = makePipeEndpoint(cfgSnap.Proxy.LocalServiceSocketPath)
|
||||
} else {
|
||||
addr := cfgSnap.Proxy.LocalServiceAddress
|
||||
if addr == "" {
|
||||
addr = "127.0.0.1"
|
||||
}
|
||||
endpoint = makeEndpoint(addr, port)
|
||||
}
|
||||
|
||||
c = &envoy_cluster_v3.Cluster{
|
||||
Name: name,
|
||||
ConnectTimeout: ptypes.DurationProto(time.Duration(cfg.LocalConnectTimeoutMs) * time.Millisecond),
|
||||
|
@ -413,7 +420,7 @@ func (s *ResourceGenerator) makeAppCluster(cfgSnap *proxycfg.ConfigSnapshot, nam
|
|||
Endpoints: []*envoy_endpoint_v3.LocalityLbEndpoints{
|
||||
{
|
||||
LbEndpoints: []*envoy_endpoint_v3.LbEndpoint{
|
||||
makeEndpoint(addr, port),
|
||||
endpoint,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -287,6 +287,7 @@ func (s *ResourceGenerator) endpointsFromSnapshotIngressGateway(cfgSnap *proxycf
|
|||
return resources, nil
|
||||
}
|
||||
|
||||
// used in clusters.go
|
||||
func makeEndpoint(host string, port int) *envoy_endpoint_v3.LbEndpoint {
|
||||
return &envoy_endpoint_v3.LbEndpoint{
|
||||
HostIdentifier: &envoy_endpoint_v3.LbEndpoint_Endpoint{
|
||||
|
@ -297,6 +298,16 @@ func makeEndpoint(host string, port int) *envoy_endpoint_v3.LbEndpoint {
|
|||
}
|
||||
}
|
||||
|
||||
func makePipeEndpoint(path string) *envoy_endpoint_v3.LbEndpoint {
|
||||
return &envoy_endpoint_v3.LbEndpoint{
|
||||
HostIdentifier: &envoy_endpoint_v3.LbEndpoint_Endpoint{
|
||||
Endpoint: &envoy_endpoint_v3.Endpoint{
|
||||
Address: makePipeAddress(path, 0),
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (s *ResourceGenerator) endpointsFromDiscoveryChain(
|
||||
id string,
|
||||
chain *structs.CompiledDiscoveryChain,
|
||||
|
|
|
@ -118,6 +118,7 @@ type AgentServiceConnectProxyConfig struct {
|
|||
DestinationServiceID string `json:",omitempty"`
|
||||
LocalServiceAddress string `json:",omitempty"`
|
||||
LocalServicePort int `json:",omitempty"`
|
||||
LocalServiceSocketPath string `json:",omitempty"`
|
||||
Mode ProxyMode `json:",omitempty"`
|
||||
TransparentProxy *TransparentProxyConfig `json:",omitempty"`
|
||||
Config map[string]interface{} `json:",omitempty" bexpr:"-"`
|
||||
|
|
|
@ -98,7 +98,6 @@ func (uc *UpstreamConfig) ConnectTimeout() time.Duration {
|
|||
return 10000 * time.Millisecond
|
||||
}
|
||||
|
||||
// markan START TOMORROW HERE; discover where this is applied
|
||||
// applyDefaults sets zero-valued params to a sane default.
|
||||
func (uc *UpstreamConfig) applyDefaults() {
|
||||
if uc.DestinationType == "" {
|
||||
|
@ -115,7 +114,6 @@ func (uc *UpstreamConfig) applyDefaults() {
|
|||
// String returns a string that uniquely identifies the Upstream. Used for
|
||||
// identifying the upstream in log output and map keys.
|
||||
func (uc *UpstreamConfig) String() string {
|
||||
// TODO markan upfactor
|
||||
addr := uc.LocalBindSocketPath
|
||||
if addr == "" {
|
||||
addr = fmt.Sprintf(
|
||||
|
@ -250,6 +248,9 @@ func (w *AgentConfigWatcher) handler(blockVal watch.BlockingParamVal,
|
|||
}
|
||||
cfg.PublicListener.BindAddress = resp.Address
|
||||
cfg.PublicListener.BindPort = resp.Port
|
||||
if resp.Proxy.LocalServiceSocketPath != "" {
|
||||
w.logger.Error("Unhandled unix domain socket config %+v %+v", resp.Proxy, cfg.PublicListener)
|
||||
}
|
||||
cfg.PublicListener.LocalServiceAddress = ipaddr.FormatAddressPort(
|
||||
resp.Proxy.LocalServiceAddress, resp.Proxy.LocalServicePort)
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ func ConnectProxyConfigToStructs(s ConnectProxyConfig) structs.ConnectProxyConfi
|
|||
t.DestinationServiceID = s.DestinationServiceID
|
||||
t.LocalServiceAddress = s.LocalServiceAddress
|
||||
t.LocalServicePort = int(s.LocalServicePort)
|
||||
t.LocalServiceSocketPath = s.LocalServiceSocketPath
|
||||
t.Mode = s.Mode
|
||||
t.Config = ProtobufTypesStructToMapStringInterface(s.Config)
|
||||
t.Upstreams = UpstreamsToStructs(s.Upstreams)
|
||||
|
@ -24,6 +25,7 @@ func NewConnectProxyConfigFromStructs(t structs.ConnectProxyConfig) ConnectProxy
|
|||
s.DestinationServiceID = t.DestinationServiceID
|
||||
s.LocalServiceAddress = t.LocalServiceAddress
|
||||
s.LocalServicePort = int32(t.LocalServicePort)
|
||||
s.LocalServiceSocketPath = t.LocalServiceSocketPath
|
||||
s.Mode = t.Mode
|
||||
s.Config = MapStringInterfaceToProtobufTypesStruct(t.Config)
|
||||
s.Upstreams = NewUpstreamsFromStructs(t.Upstreams)
|
||||
|
@ -142,6 +144,8 @@ func UpstreamToStructs(s Upstream) structs.Upstream {
|
|||
t.Datacenter = s.Datacenter
|
||||
t.LocalBindAddress = s.LocalBindAddress
|
||||
t.LocalBindPort = int(s.LocalBindPort)
|
||||
t.LocalBindSocketPath = s.LocalBindSocketPath
|
||||
t.LocalBindSocketMode = s.LocalBindSocketMode
|
||||
t.Config = ProtobufTypesStructToMapStringInterface(s.Config)
|
||||
t.MeshGateway = MeshGatewayConfigToStructs(s.MeshGateway)
|
||||
t.CentrallyConfigured = s.CentrallyConfigured
|
||||
|
@ -155,6 +159,8 @@ func NewUpstreamFromStructs(t structs.Upstream) Upstream {
|
|||
s.Datacenter = t.Datacenter
|
||||
s.LocalBindAddress = t.LocalBindAddress
|
||||
s.LocalBindPort = int32(t.LocalBindPort)
|
||||
s.LocalBindSocketPath = t.LocalBindSocketPath
|
||||
s.LocalBindSocketMode = t.LocalBindSocketMode
|
||||
s.Config = MapStringInterfaceToProtobufTypesStruct(t.Config)
|
||||
s.MeshGateway = NewMeshGatewayConfigFromStructs(t.MeshGateway)
|
||||
s.CentrallyConfigured = t.CentrallyConfigured
|
||||
|
|
|
@ -76,6 +76,8 @@ type ConnectProxyConfig struct {
|
|||
// TransparentProxy defines configuration for when the proxy is in
|
||||
// transparent mode.
|
||||
TransparentProxy TransparentProxyConfig `protobuf:"bytes,10,opt,name=TransparentProxy,proto3" json:"TransparentProxy"`
|
||||
// LocalServiceSocketPath is the path to the unix domain socket for the local service instance
|
||||
LocalServiceSocketPath string `protobuf:"bytes,11,opt,name=LocalServiceSocketPath,proto3" json:"LocalServiceSocketPath,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ConnectProxyConfig) Reset() { *m = ConnectProxyConfig{} }
|
||||
|
@ -453,8 +455,10 @@ type ServiceDefinition struct {
|
|||
TaggedAddresses map[string]ServiceAddress `protobuf:"bytes,16,rep,name=TaggedAddresses,proto3" json:"TaggedAddresses" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
Meta map[string]string `protobuf:"bytes,6,rep,name=Meta,proto3" json:"Meta,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
// mog: func-to=int func-from=int32
|
||||
Port int32 `protobuf:"varint,7,opt,name=Port,proto3" json:"Port,omitempty"`
|
||||
Check CheckType `protobuf:"bytes,8,opt,name=Check,proto3" json:"Check"`
|
||||
Port int32 `protobuf:"varint,7,opt,name=Port,proto3" json:"Port,omitempty"`
|
||||
// Path for socket
|
||||
SocketPath string `protobuf:"bytes,18,opt,name=SocketPath,proto3" json:"SocketPath,omitempty"`
|
||||
Check CheckType `protobuf:"bytes,8,opt,name=Check,proto3" json:"Check"`
|
||||
// mog: func-to=CheckTypesToStructs func-from=NewCheckTypesFromStructs
|
||||
Checks []*CheckType `protobuf:"bytes,9,rep,name=Checks,proto3" json:"Checks,omitempty"`
|
||||
// mog: func-to=WeightsPtrToStructs func-from=NewWeightsPtrFromStructs
|
||||
|
@ -611,80 +615,81 @@ func init() {
|
|||
func init() { proto.RegisterFile("proto/pbservice/service.proto", fileDescriptor_cbb99233b75fb80b) }
|
||||
|
||||
var fileDescriptor_cbb99233b75fb80b = []byte{
|
||||
// 1161 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0xcf, 0x6f, 0x1b, 0x45,
|
||||
0x14, 0xc7, 0xbd, 0xfe, 0x11, 0xdb, 0x2f, 0x25, 0x4d, 0xa6, 0x26, 0x2c, 0xa1, 0x75, 0x52, 0x0b,
|
||||
0xa1, 0x08, 0x22, 0x3b, 0x4d, 0x54, 0x42, 0x2b, 0x15, 0x89, 0xc4, 0x01, 0x55, 0x4d, 0x5a, 0xb3,
|
||||
0x31, 0xaa, 0x40, 0xe2, 0x30, 0x5e, 0x4f, 0xd6, 0xab, 0xd8, 0x33, 0xd6, 0xce, 0x38, 0x34, 0x47,
|
||||
0xfe, 0x03, 0x6e, 0xf0, 0x67, 0xf0, 0x67, 0xe4, 0xd8, 0x23, 0xa7, 0x08, 0x92, 0x33, 0xff, 0x40,
|
||||
0x4e, 0x68, 0xde, 0xce, 0x6e, 0xd6, 0xeb, 0x25, 0x2a, 0x9c, 0xbc, 0xf3, 0xbe, 0xef, 0xbd, 0x1d,
|
||||
0xbf, 0xf9, 0xbc, 0x37, 0x0b, 0x0f, 0xc6, 0x81, 0x50, 0xa2, 0x35, 0xee, 0x49, 0x16, 0x9c, 0xfa,
|
||||
0x2e, 0x6b, 0x99, 0xdf, 0x26, 0xda, 0x49, 0x35, 0x16, 0x56, 0xee, 0x7b, 0x42, 0x78, 0x43, 0xd6,
|
||||
0x42, 0xa1, 0x37, 0x39, 0x6e, 0x49, 0x15, 0x4c, 0x5c, 0x15, 0x3a, 0xae, 0x7c, 0x14, 0xe5, 0x71,
|
||||
0xc5, 0x68, 0x24, 0x78, 0x2b, 0xfc, 0x31, 0xe2, 0xc3, 0xf4, 0x4b, 0x06, 0x8c, 0x0e, 0xd5, 0xc0,
|
||||
0x1d, 0x30, 0xf7, 0xc4, 0xb8, 0xd4, 0x3c, 0xe1, 0x89, 0xd0, 0x4d, 0x3f, 0x85, 0xd6, 0xc6, 0xdf,
|
||||
0x45, 0x20, 0x7b, 0x82, 0x73, 0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 0x90, 0xcc, 0xae, 0x98, 0x5d, 0xdf, 0x24, 0x08, 0x85, 0xa9, 0x58, 0xe3, 0x4c, 0x5e,
|
||||
0x40, 0xf1, 0x50, 0xf4, 0x99, 0x5d, 0xd5, 0xb5, 0xdb, 0xdd, 0xb9, 0xbe, 0x58, 0xdd, 0xf6, 0x7c,
|
||||
0x35, 0x98, 0xf4, 0x9a, 0xae, 0x18, 0xb5, 0x06, 0x54, 0x0e, 0x7c, 0x57, 0x04, 0xe3, 0x96, 0x2b,
|
||||
0xb8, 0x9c, 0x0c, 0x5b, 0xd4, 0x63, 0x5c, 0x19, 0xca, 0x64, 0x13, 0xcf, 0x5f, 0x87, 0x3b, 0x98,
|
||||
0x84, 0x1c, 0xc1, 0x62, 0x37, 0xa0, 0x5c, 0x8e, 0x69, 0xc0, 0x78, 0x48, 0x87, 0x0d, 0xb8, 0x9b,
|
||||
0x87, 0x89, 0xdd, 0xa4, 0x5d, 0xa6, 0xf6, 0x35, 0x93, 0xa0, 0xf1, 0x6b, 0x11, 0x2a, 0x51, 0xb1,
|
||||
0xc8, 0x3a, 0xdc, 0x4d, 0x10, 0xd1, 0x3d, 0x1b, 0x47, 0x78, 0xa5, 0xcd, 0x29, 0xae, 0x34, 0x6a,
|
||||
0x72, 0x4c, 0x5d, 0x96, 0xc1, 0x55, 0xac, 0xa5, 0xb2, 0x23, 0xbc, 0x85, 0x99, 0xec, 0x48, 0x6d,
|
||||
0x1d, 0xa0, 0x4d, 0x15, 0x75, 0x19, 0x57, 0x2c, 0x40, 0x92, 0xaa, 0x4e, 0xc2, 0x12, 0xf3, 0xb6,
|
||||
0xeb, 0xf3, 0x7e, 0x84, 0x67, 0x09, 0xbd, 0x66, 0xec, 0xe4, 0x63, 0x78, 0x2f, 0xb6, 0x21, 0x98,
|
||||
0x73, 0x08, 0xe6, 0xb4, 0x31, 0x41, 0x65, 0xf9, 0xbf, 0x50, 0x99, 0x82, 0xab, 0xf2, 0xff, 0xe0,
|
||||
0xda, 0x84, 0x7b, 0x7b, 0x8c, 0xab, 0x80, 0x0e, 0x87, 0xc6, 0x6b, 0x12, 0xb0, 0x3e, 0x42, 0x53,
|
||||
0x71, 0xb2, 0xa4, 0xb8, 0x45, 0xf5, 0xfe, 0x8f, 0x84, 0x7b, 0xc2, 0x54, 0x87, 0xaa, 0x01, 0xd2,
|
||||
0x10, 0xb5, 0xe8, 0xb4, 0x94, 0x11, 0x81, 0x60, 0xce, 0x67, 0x46, 0x68, 0xa9, 0xc1, 0x61, 0xc1,
|
||||
0xf4, 0xad, 0x99, 0x47, 0x64, 0x19, 0xe6, 0x5e, 0x52, 0xe5, 0x9f, 0x86, 0x54, 0x54, 0x1c, 0xb3,
|
||||
0x22, 0x6d, 0x58, 0x38, 0xf2, 0xfb, 0xcc, 0xa5, 0x81, 0x09, 0xc0, 0x73, 0x9d, 0x2e, 0x84, 0x51,
|
||||
0xda, 0xec, 0xd8, 0xe7, 0xbe, 0x3e, 0x68, 0x27, 0x15, 0xd3, 0xf8, 0x1e, 0xee, 0x24, 0x3b, 0x49,
|
||||
0xbf, 0x6d, 0x4f, 0x8f, 0x4b, 0x19, 0xbd, 0x2d, 0x5c, 0x91, 0x47, 0x50, 0xd2, 0xff, 0x48, 0xda,
|
||||
0x79, 0x9c, 0x02, 0xef, 0xcf, 0x74, 0xa2, 0x56, 0x4d, 0x99, 0x43, 0xcf, 0xc6, 0xef, 0x16, 0xc0,
|
||||
0x8d, 0x46, 0x1a, 0x70, 0xe7, 0xc0, 0x97, 0x8a, 0x71, 0x16, 0x20, 0x11, 0x16, 0x12, 0x31, 0x65,
|
||||
0x23, 0x04, 0x8a, 0x58, 0xd2, 0x10, 0x68, 0x7c, 0x8e, 0x51, 0xd2, 0x0b, 0x0c, 0x2c, 0x24, 0x50,
|
||||
0x8a, 0x8c, 0x64, 0x05, 0x2a, 0x1d, 0x0d, 0x8d, 0x2b, 0x86, 0x06, 0xdd, 0x78, 0xad, 0x5b, 0xa0,
|
||||
0x43, 0x03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||
0xa1, 0x14, 0xf2, 0x13, 0xce, 0x9c, 0x5a, 0x22, 0x21, 0xda, 0xf5, 0x94, 0x8e, 0x9a, 0x00, 0x0d,
|
||||
0x64, 0x23, 0xee, 0xa7, 0x2a, 0xee, 0x21, 0x33, 0x24, 0xee, 0xb2, 0x0d, 0x28, 0xbf, 0x66, 0xbe,
|
||||
0x37, 0x50, 0xd2, 0xdc, 0x31, 0x24, 0xe1, 0x6e, 0x14, 0x27, 0x72, 0x21, 0x35, 0x28, 0x75, 0xc5,
|
||||
0x09, 0xe3, 0x66, 0x9e, 0x84, 0x0b, 0xb2, 0x01, 0x4b, 0xfb, 0x9c, 0xf6, 0x86, 0xac, 0x4b, 0xbd,
|
||||
0x57, 0xa7, 0x2c, 0x08, 0xfc, 0x3e, 0xb3, 0xef, 0x20, 0xef, 0xb3, 0x02, 0xd9, 0x86, 0x52, 0x78,
|
||||
0xa7, 0x2d, 0xe0, 0xfb, 0x1e, 0x24, 0xb7, 0x37, 0xf3, 0x41, 0xe4, 0x84, 0xbe, 0x7a, 0xf4, 0xec,
|
||||
0xeb, 0x2b, 0x61, 0x1c, 0xf8, 0x92, 0x61, 0x81, 0x97, 0x30, 0x7a, 0xb9, 0x69, 0x3e, 0xc7, 0xa6,
|
||||
0x55, 0x53, 0x91, 0x54, 0x0c, 0xd9, 0x86, 0xb2, 0x79, 0x85, 0x7d, 0x17, 0xc3, 0x3f, 0x9c, 0x3d,
|
||||
0x1f, 0xe3, 0xe0, 0x44, 0x9e, 0x2b, 0x3f, 0x42, 0x2d, 0x0b, 0x00, 0xb2, 0x08, 0x85, 0x13, 0x76,
|
||||
0x66, 0x2e, 0x4e, 0xfd, 0x48, 0x5a, 0x50, 0x3a, 0xa5, 0xc3, 0x49, 0x78, 0x3b, 0x66, 0x26, 0x37,
|
||||
0x29, 0x9c, 0xd0, 0xef, 0x69, 0xfe, 0x0b, 0x6b, 0x65, 0x07, 0xaa, 0x31, 0x07, 0x19, 0x39, 0x6b,
|
||||
0xc9, 0x9c, 0xd5, 0x44, 0x60, 0xe3, 0xcb, 0x78, 0x6e, 0x47, 0x78, 0x27, 0xc0, 0xb7, 0xa6, 0xc1,
|
||||
0x8f, 0xc8, 0xca, 0xdf, 0x90, 0xd5, 0x78, 0x16, 0x9f, 0xbc, 0x0e, 0xec, 0x50, 0x29, 0x7d, 0xee,
|
||||
0x99, 0xae, 0x8f, 0x96, 0x5a, 0x79, 0x4d, 0x03, 0xae, 0x95, 0x30, 0x36, 0x5a, 0xee, 0x1e, 0x9e,
|
||||
0xff, 0x55, 0xcf, 0x9d, 0x5f, 0xd6, 0xad, 0xb7, 0x97, 0x75, 0xeb, 0xcf, 0xcb, 0xba, 0xf5, 0xcb,
|
||||
0x55, 0x3d, 0xf7, 0xdb, 0x55, 0x3d, 0xf7, 0xf6, 0xaa, 0x9e, 0xfb, 0xe3, 0xaa, 0x9e, 0xfb, 0xe1,
|
||||
0xb3, 0xdb, 0x9a, 0x3f, 0xf5, 0xdd, 0xdc, 0x9b, 0x43, 0xc3, 0xf6, 0x3f, 0x01, 0x00, 0x00, 0xff,
|
||||
0xff, 0x0f, 0xd3, 0xfd, 0x57, 0xb6, 0x0b, 0x00, 0x00,
|
||||
// 1179 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x6f, 0x1b, 0x45,
|
||||
0x14, 0xf7, 0xfa, 0x4f, 0x6c, 0xbf, 0x94, 0x34, 0x99, 0x98, 0xb0, 0x84, 0xd6, 0x49, 0x2d, 0x84,
|
||||
0x22, 0x88, 0xec, 0x36, 0x51, 0x09, 0xad, 0x54, 0x24, 0x12, 0x07, 0x54, 0x35, 0x69, 0xcd, 0xc6,
|
||||
0xa8, 0x02, 0x89, 0xc3, 0x78, 0x3d, 0x59, 0xaf, 0x62, 0xef, 0x58, 0x3b, 0xe3, 0xd0, 0x7c, 0x0b,
|
||||
0x6e,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0x0f, 0x99,
|
||||
0x10, 0x76, 0x01, 0x29, 0x59, 0x10, 0xf9, 0x14, 0x16, 0x93, 0xe6, 0x0e, 0x0f, 0xa5, 0x5d, 0x5c,
|
||||
0xb7, 0x36, 0x4a, 0xce, 0x8c, 0x9d, 0x3c, 0x86, 0x39, 0xfd, 0x9f, 0xec, 0xd2, 0xba, 0xb5, 0x31,
|
||||
0xbf, 0xf5, 0x41, 0x53, 0x67, 0xb9, 0x19, 0x65, 0xb9, 0x79, 0x84, 0x59, 0xde, 0x2d, 0x9e, 0x5f,
|
||||
0xac, 0x59, 0x8e, 0x71, 0x26, 0x3b, 0x50, 0xfd, 0x6e, 0x2c, 0x64, 0xc8, 0xe8, 0x48, 0xd8, 0x73,
|
||||
0xeb, 0x85, 0x8d, 0xf9, 0xad, 0xe5, 0x66, 0x9c, 0xde, 0x66, 0x84, 0x21, 0x2b, 0xe7, 0xdc, 0xf8,
|
||||
0x92, 0x36, 0xcc, 0x1f, 0x32, 0x31, 0xf8, 0x86, 0x4a, 0xf6, 0x13, 0x3d, 0xb3, 0xcb, 0x78, 0xe8,
|
||||
0xbd, 0x04, 0x35, 0x81, 0xea, 0xb3, 0x4c, 0x8c, 0x24, 0x4d, 0xdd, 0x7a, 0xff, 0xcd, 0x98, 0x0b,
|
||||
0x66, 0x57, 0xcc, 0xad, 0x6f, 0x02, 0x68, 0x60, 0x8a, 0x6b, 0x9c, 0xc9, 0x0b, 0x28, 0x1e, 0xf2,
|
||||
0x3e, 0xb3, 0xab, 0x2a, 0x77, 0xbb, 0x3b, 0xd7, 0x17, 0x6b, 0xdb, 0x9e, 0x2f, 0x07, 0x93, 0x5e,
|
||||
0xd3, 0xe5, 0xa3, 0xd6, 0x80, 0x8a, 0x81, 0xef, 0xf2, 0x70, 0xdc, 0x72, 0x79, 0x20, 0x26, 0xc3,
|
||||
0x16, 0xf5, 0x58, 0x20, 0x8d, 0xca, 0x44, 0x13, 0xeb, 0xaf, 0xe8, 0x0e, 0x06, 0x21, 0x47, 0xb0,
|
||||
0xd8, 0x0d, 0x69, 0x20, 0xc6, 0x34, 0x64, 0x81, 0x56, 0x87, 0x0d, 0x78, 0x9b, 0x07, 0x89, 0xdb,
|
||||
0xa4, 0x5d, 0xa6, 0xee, 0x35, 0x13, 0x40, 0x09, 0x2b, 0x59, 0xa2, 0x23, 0xee, 0x9e, 0x30, 0xd9,
|
||||
0xa1, 0x72, 0x60, 0xcf, 0x6b, 0x61, 0x65, 0xa3, 0x8d, 0x5f, 0x8a, 0x50, 0x89, 0x92, 0x4c, 0x36,
|
||||
0xe0, 0x6e, 0x42, 0x49, 0xdd, 0xb3, 0x71, 0x24, 0xcb, 0xb4, 0x39, 0xa5, 0x47, 0x25, 0x51, 0x31,
|
||||
0xa6, 0x2e, 0xcb, 0xd0, 0x63, 0x8c, 0xa5, 0xa2, 0xa3, 0xe8, 0x0b, 0x33, 0xd1, 0x51, 0xed, 0x75,
|
||||
0x80, 0x36, 0x95, 0xd4, 0x65, 0x81, 0x64, 0x21, 0x2a, 0xb0, 0xea, 0x24, 0x2c, 0xb1, 0x4e, 0x77,
|
||||
0xfd, 0xa0, 0x1f, 0xc9, 0xba, 0x84, 0x5e, 0x33, 0x76, 0xf2, 0x31, 0xbc, 0x17, 0xdb, 0x50, 0xd0,
|
||||
0x73, 0x28, 0xe8, 0x69, 0x63, 0x42, 0xcd, 0xe5, 0xff, 0xa2, 0xe6, 0x94, 0x28, 0x2b, 0xff, 0x4f,
|
||||
0x94, 0x0f, 0x61, 0x79, 0x8f, 0x05, 0x32, 0xa4, 0xc3, 0xa1, 0xf1, 0x9a, 0x84, 0xac, 0x8f, 0x62,
|
||||
0xab, 0x38, 0x59, 0x50, 0xdc, 0xda, 0xea, 0xfe, 0x89, 0x52, 0x43, 0xa2, 0xb5, 0xa7, 0xa1, 0x0c,
|
||||
0x06, 0x0a, 0x7a, 0x3e, 0x93, 0xa1, 0xa0, 0x46, 0x00, 0x0b, 0x46, 0x2e, 0x66, 0x8e, 0x91, 0x15,
|
||||
0x98, 0x7b, 0x49, 0xa5, 0x7f, 0xaa, 0x55, 0x51, 0x71, 0xcc, 0x8e, 0xb4, 0x61, 0xe1, 0xc8, 0xef,
|
||||
0x33, 0x97, 0x86, 0x86, 0x80, 0x75, 0x9d, 0x4e, 0x84, 0x41, 0xda, 0xec, 0xd8, 0x0f, 0x7c, 0x55,
|
||||
0x68, 0x27, 0xc5, 0x69, 0x7c, 0x0f, 0x77, 0x92, 0x1d, 0xa8, 0x4e, 0xdb, 0x53, 0x63, 0x56, 0x44,
|
||||
0xa7, 0xe9, 0x1d, 0x79, 0x04, 0x25, 0xf5, 0x8f, 0x84, 0x9d, 0xc7, 0xe9, 0xf1, 0xfe, 0x4c, 0x07,
|
||||
0x2b, 0xd4, 0xa4, 0x59, 0x7b, 0x36, 0xfe, 0xb0, 0x00, 0x6e, 0x30, 0xd2, 0x80, 0x3b, 0x07, 0xbe,
|
||||
0x90, 0x2c, 0x60, 0x21, 0x2a, 0xc2, 0x42, 0x45, 0x4c, 0xd9, 0x08, 0x81, 0x22, 0xa6, 0x54, 0x0b,
|
||||
0x1a, 0xd7, 0xb1, 0x94, 0xd4, 0x06, 0x89, 0x85, 0x84, 0x94, 0x22, 0x23, 0x59, 0x85, 0x4a, 0x47,
|
||||
0x89, 0xc6, 0xe5, 0x43, 0x23, 0xdd, 0x78, 0xaf, 0x5a, 0xa0, 0x43, 0x43, 0xc1, 0xfa, 0x5f, 0x87,
|
||||
0x7c, 0x84, 0xff, 0x07, 0x75, 0x5b, 0x71, 0xd2, 0xe6, 0xc6, 0x31, 0x2c, 0xcd, 0x68, 0x87, 0x7c,
|
||||
0x6b, 0xc6, 0x10, 0x36, 0xe5, 0xee, 0xb3, 0xeb, 0x8b, 0xb5, 0x27, 0xef, 0x3e, 0x86, 0x12, 0xe1,
|
||||
0x6e, 0x86, 0x51, 0xe3, 0x00, 0x56, 0xb2, 0x27, 0x8d, 0x6a, 0xf1, 0x57, 0x13, 0xd9, 0x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x72, 0x21, 0x35, 0x28,
|
||||
0x75, 0xf9, 0x09, 0x0b, 0xcc, 0xbc, 0xd1, 0x1b, 0xb2, 0x09, 0x4b, 0xfb, 0x01, 0xed, 0x0d, 0x59,
|
||||
0x97, 0x7a, 0xaf, 0x4e, 0x59, 0x18, 0xfa, 0x7d, 0x66, 0xdf, 0xc1, 0x7e, 0x98, 0x05, 0xc8, 0x36,
|
||||
0x94, 0xf4, 0x5b, 0xb9, 0x80, 0xe7, 0xdd, 0x4f, 0x5e, 0x6f, 0xe6, 0x43, 0xcb, 0xd1, 0xbe, 0x6a,
|
||||
0x34, 0xed, 0xab, 0x27, 0x63, 0x1c, 0xfa, 0x82, 0x61, 0x01, 0x96, 0x90, 0xbd, 0xd2, 0x34, 0x9f,
|
||||
0x79, 0xd3, 0xa8, 0xc9, 0x48, 0x8a, 0x43, 0xb6, 0xa1, 0x6c, 0x8e, 0xb0, 0xef, 0x22, 0xfd, 0xc3,
|
||||
0xd9, 0xfa, 0x19, 0x07, 0x27, 0xf2, 0x5c, 0xfd, 0x11, 0x6a, 0x59, 0x02, 0x21, 0x8b, 0x50, 0x38,
|
||||
0x61, 0x67, 0xe6, 0x61, 0x55, 0x4b, 0xd2, 0x82, 0xd2, 0x29, 0x1d, 0x4e, 0xf4, 0xeb, 0x99, 0x19,
|
||||
0xdc, 0x84, 0x70, 0xb4, 0xdf, 0xd3, 0xfc, 0x17, 0xd6, 0xea, 0x0e, 0x54, 0x63, 0x9d, 0x64, 0xc4,
|
||||
0xac, 0x25, 0x63, 0x56, 0x13, 0xc4, 0xc6, 0x97, 0xf1, 0x5c, 0x8f, 0xe4, 0x9f, 0x68, 0x0c, 0x6b,
|
||||
0xba, 0x31, 0x22, 0xe5, 0xe5, 0x6f, 0x94, 0xd7, 0x78, 0x16, 0x57, 0x5e, 0x11, 0x3b, 0x54, 0x08,
|
||||
0x3f, 0xf0, 0xcc, 0x54, 0x88, 0xb6, 0x0a, 0x79, 0x4d, 0xc3, 0x40, 0x21, 0x9a, 0x1b, 0x6d, 0x77,
|
||||
0x0f, 0xcf, 0xff, 0xae, 0xe7, 0xce, 0x2f, 0xeb, 0xd6, 0xdb, 0xcb, 0xba, 0xf5, 0xd7, 0x65, 0xdd,
|
||||
0xfa, 0xf9, 0xaa, 0x9e, 0xfb, 0xf5, 0xaa, 0x9e, 0x7b, 0x7b, 0x55, 0xcf, 0xfd, 0x79, 0x55, 0xcf,
|
||||
0xfd, 0xf0, 0xd9, 0x6d, 0xc3, 0x21, 0xf5, 0x3d, 0xde, 0x9b, 0x43, 0xc3, 0xf6, 0x3f, 0x01, 0x00,
|
||||
0x00, 0xff, 0xff, 0x44, 0x39, 0xad, 0x45, 0x0e, 0x0c, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *ConnectProxyConfig) Marshal() (dAtA []byte, err error) {
|
||||
|
@ -707,6 +712,13 @@ func (m *ConnectProxyConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.LocalServiceSocketPath) > 0 {
|
||||
i -= len(m.LocalServiceSocketPath)
|
||||
copy(dAtA[i:], m.LocalServiceSocketPath)
|
||||
i = encodeVarintService(dAtA, i, uint64(len(m.LocalServiceSocketPath)))
|
||||
i--
|
||||
dAtA[i] = 0x5a
|
||||
}
|
||||
{
|
||||
size, err := m.TransparentProxy.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
|
@ -1135,6 +1147,15 @@ func (m *ServiceDefinition) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.SocketPath) > 0 {
|
||||
i -= len(m.SocketPath)
|
||||
copy(dAtA[i:], m.SocketPath)
|
||||
i = encodeVarintService(dAtA, i, uint64(len(m.SocketPath)))
|
||||
i--
|
||||
dAtA[i] = 0x1
|
||||
i--
|
||||
dAtA[i] = 0x92
|
||||
}
|
||||
{
|
||||
size, err := m.EnterpriseMeta.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
|
@ -1434,6 +1455,10 @@ func (m *ConnectProxyConfig) Size() (n int) {
|
|||
}
|
||||
l = m.TransparentProxy.Size()
|
||||
n += 1 + l + sovService(uint64(l))
|
||||
l = len(m.LocalServiceSocketPath)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovService(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
|
@ -1648,6 +1673,10 @@ func (m *ServiceDefinition) Size() (n int) {
|
|||
}
|
||||
l = m.EnterpriseMeta.Size()
|
||||
n += 2 + l + sovService(uint64(l))
|
||||
l = len(m.SocketPath)
|
||||
if l > 0 {
|
||||
n += 2 + l + sovService(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
|
@ -2033,6 +2062,38 @@ func (m *ConnectProxyConfig) Unmarshal(dAtA []byte) error {
|
|||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 11:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field LocalServiceSocketPath", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowService
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.LocalServiceSocketPath = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipService(dAtA[iNdEx:])
|
||||
|
@ -3714,6 +3775,38 @@ func (m *ServiceDefinition) Unmarshal(dAtA []byte) error {
|
|||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 18:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field SocketPath", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowService
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthService
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.SocketPath = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipService(dAtA[iNdEx:])
|
||||
|
|
|
@ -76,6 +76,9 @@ message ConnectProxyConfig {
|
|||
// TransparentProxy defines configuration for when the proxy is in
|
||||
// transparent mode.
|
||||
TransparentProxyConfig TransparentProxy = 10 [(gogoproto.nullable) = false];
|
||||
|
||||
// LocalServiceSocketPath is the path to the unix domain socket for the local service instance
|
||||
string LocalServiceSocketPath = 11;
|
||||
}
|
||||
|
||||
// Upstream represents a single upstream dependency for a service or proxy. It
|
||||
|
@ -236,6 +239,8 @@ message ServiceDefinition {
|
|||
map<string, string> Meta = 6;
|
||||
// mog: func-to=int func-from=int32
|
||||
int32 Port = 7;
|
||||
// Path for socket
|
||||
string SocketPath = 18;
|
||||
CheckType Check = 8 [(gogoproto.nullable) = false];
|
||||
// mog: func-to=CheckTypesToStructs func-from=NewCheckTypesFromStructs
|
||||
repeated CheckType Checks = 9;
|
||||
|
|
Loading…
Reference in New Issue