mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 22:06:20 +00:00
Merge pull request #10185 from hashicorp/ma/uds_fixups
Fixup UDS failing tests.
This commit is contained in:
commit
d93dbb866f
@ -399,7 +399,7 @@ func TestAgent_Service(t *testing.T) {
|
|||||||
Service: "web-sidecar-proxy",
|
Service: "web-sidecar-proxy",
|
||||||
Port: 8000,
|
Port: 8000,
|
||||||
Proxy: expectProxy.ToAPI(),
|
Proxy: expectProxy.ToAPI(),
|
||||||
ContentHash: "35ad6dd5b1ff8d18",
|
ContentHash: "9dcdedfd5047d46e",
|
||||||
Weights: api.AgentWeights{
|
Weights: api.AgentWeights{
|
||||||
Passing: 1,
|
Passing: 1,
|
||||||
Warning: 1,
|
Warning: 1,
|
||||||
@ -413,14 +413,14 @@ func TestAgent_Service(t *testing.T) {
|
|||||||
// Copy and modify
|
// Copy and modify
|
||||||
updatedResponse := *expectedResponse
|
updatedResponse := *expectedResponse
|
||||||
updatedResponse.Port = 9999
|
updatedResponse.Port = 9999
|
||||||
updatedResponse.ContentHash = "8e407e299ec9eba"
|
updatedResponse.ContentHash = "a08487ca7854c7cc"
|
||||||
|
|
||||||
// Simple response for non-proxy service registered in TestAgent config
|
// Simple response for non-proxy service registered in TestAgent config
|
||||||
expectWebResponse := &api.AgentService{
|
expectWebResponse := &api.AgentService{
|
||||||
ID: "web",
|
ID: "web",
|
||||||
Service: "web",
|
Service: "web",
|
||||||
Port: 8181,
|
Port: 8181,
|
||||||
ContentHash: "6c247f8ffa5d1fb2",
|
ContentHash: "f012740ee2d8ce60",
|
||||||
Weights: api.AgentWeights{
|
Weights: api.AgentWeights{
|
||||||
Passing: 1,
|
Passing: 1,
|
||||||
Warning: 1,
|
Warning: 1,
|
||||||
|
@ -5648,6 +5648,13 @@ func TestLoad_FullConfig(t *testing.T) {
|
|||||||
LocalBindPort: 11884,
|
LocalBindPort: 11884,
|
||||||
LocalBindAddress: "127.24.88.0",
|
LocalBindAddress: "127.24.88.0",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
DestinationType: "prepared_query",
|
||||||
|
DestinationNamespace: "9nakw0td",
|
||||||
|
DestinationName: "placeholder",
|
||||||
|
LocalBindSocketPath: "/foo/bar/upstream",
|
||||||
|
LocalBindSocketMode: "0600",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Expose: structs.ExposeConfig{
|
Expose: structs.ExposeConfig{
|
||||||
Checks: true,
|
Checks: true,
|
||||||
|
@ -325,6 +325,7 @@
|
|||||||
"Name": "foo",
|
"Name": "foo",
|
||||||
"Port": 0,
|
"Port": 0,
|
||||||
"Proxy": null,
|
"Proxy": null,
|
||||||
|
"SocketPath": "",
|
||||||
"TaggedAddresses": {},
|
"TaggedAddresses": {},
|
||||||
"Tags": [],
|
"Tags": [],
|
||||||
"Token": "hidden",
|
"Token": "hidden",
|
||||||
|
8
agent/config/testdata/full-config.hcl
vendored
8
agent/config/testdata/full-config.hcl
vendored
@ -362,7 +362,6 @@ service = {
|
|||||||
address = "cOlSOhbp"
|
address = "cOlSOhbp"
|
||||||
token = "msy7iWER"
|
token = "msy7iWER"
|
||||||
port = 24237
|
port = 24237
|
||||||
socket_path = "/tmp/rc78ap"
|
|
||||||
weights = {
|
weights = {
|
||||||
passing = 100,
|
passing = 100,
|
||||||
warning = 1
|
warning = 1
|
||||||
@ -456,7 +455,6 @@ services = [
|
|||||||
address = "9RhqPSPB"
|
address = "9RhqPSPB"
|
||||||
token = "myjKJkWH"
|
token = "myjKJkWH"
|
||||||
port = 72219
|
port = 72219
|
||||||
socket_path = "/foo/bar/sock_7IszXMQ1"
|
|
||||||
enable_tag_override = true
|
enable_tag_override = true
|
||||||
check = {
|
check = {
|
||||||
id = "qmfeO5if"
|
id = "qmfeO5if"
|
||||||
@ -563,7 +561,6 @@ services = [
|
|||||||
destination_service_id = "6L6BVfgH-id"
|
destination_service_id = "6L6BVfgH-id"
|
||||||
local_service_address = "127.0.0.2"
|
local_service_address = "127.0.0.2"
|
||||||
local_service_port = 23759
|
local_service_port = 23759
|
||||||
local_service_socket_path = "/foo/bar/local"
|
|
||||||
config {
|
config {
|
||||||
cedGGtZf = "pWrUNiWw"
|
cedGGtZf = "pWrUNiWw"
|
||||||
}
|
}
|
||||||
@ -581,6 +578,11 @@ services = [
|
|||||||
destination_name = "KSd8HsRl"
|
destination_name = "KSd8HsRl"
|
||||||
local_bind_port = 11884
|
local_bind_port = 11884
|
||||||
local_bind_address = "127.24.88.0"
|
local_bind_address = "127.24.88.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
destination_type = "prepared_query"
|
||||||
|
destination_namespace = "9nakw0td"
|
||||||
|
destination_name = "placeholder"
|
||||||
local_bind_socket_path = "/foo/bar/upstream"
|
local_bind_socket_path = "/foo/bar/upstream"
|
||||||
local_bind_socket_mode = "0600"
|
local_bind_socket_mode = "0600"
|
||||||
},
|
},
|
||||||
|
10
agent/config/testdata/full-config.json
vendored
10
agent/config/testdata/full-config.json
vendored
@ -358,7 +358,6 @@
|
|||||||
"address": "cOlSOhbp",
|
"address": "cOlSOhbp",
|
||||||
"token": "msy7iWER",
|
"token": "msy7iWER",
|
||||||
"port": 24237,
|
"port": 24237,
|
||||||
"socket_path": "/tmp/rc78ap",
|
|
||||||
"weights": {
|
"weights": {
|
||||||
"passing": 100,
|
"passing": 100,
|
||||||
"warning": 1
|
"warning": 1
|
||||||
@ -453,7 +452,6 @@
|
|||||||
"address": "9RhqPSPB",
|
"address": "9RhqPSPB",
|
||||||
"token": "myjKJkWH",
|
"token": "myjKJkWH",
|
||||||
"port": 72219,
|
"port": 72219,
|
||||||
"socket_path":"/foo/bar/sock_7IszXMQ1",
|
|
||||||
"enable_tag_override": true,
|
"enable_tag_override": true,
|
||||||
"check": {
|
"check": {
|
||||||
"id": "qmfeO5if",
|
"id": "qmfeO5if",
|
||||||
@ -563,7 +561,6 @@
|
|||||||
"destination_service_name": "6L6BVfgH",
|
"destination_service_name": "6L6BVfgH",
|
||||||
"local_service_address": "127.0.0.2",
|
"local_service_address": "127.0.0.2",
|
||||||
"local_service_port": 23759,
|
"local_service_port": 23759,
|
||||||
"local_service_socket_path": "/foo/bar/local",
|
|
||||||
"expose": {
|
"expose": {
|
||||||
"checks": true,
|
"checks": true,
|
||||||
"paths": [
|
"paths": [
|
||||||
@ -592,7 +589,12 @@
|
|||||||
"destination_namespace": "9nakw0td",
|
"destination_namespace": "9nakw0td",
|
||||||
"destination_type": "prepared_query",
|
"destination_type": "prepared_query",
|
||||||
"local_bind_address": "127.24.88.0",
|
"local_bind_address": "127.24.88.0",
|
||||||
"local_bind_port": 11884,
|
"local_bind_port": 11884
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"destination_name": "placeholder",
|
||||||
|
"destination_namespace": "9nakw0td",
|
||||||
|
"destination_type": "prepared_query",
|
||||||
"local_bind_socket_path": "/foo/bar/upstream",
|
"local_bind_socket_path": "/foo/bar/upstream",
|
||||||
"local_bind_socket_mode": "0600"
|
"local_bind_socket_mode": "0600"
|
||||||
}
|
}
|
||||||
|
@ -183,8 +183,8 @@ var expectedFieldConfigUpstreams bexpr.FieldConfigurations = bexpr.FieldConfigur
|
|||||||
},
|
},
|
||||||
"LocalBindSocketMode": &bexpr.FieldConfiguration{
|
"LocalBindSocketMode": &bexpr.FieldConfiguration{
|
||||||
StructFieldName: "LocalBindSocketMode",
|
StructFieldName: "LocalBindSocketMode",
|
||||||
CoerceFn: bexpr.CoerceInt,
|
CoerceFn: bexpr.CoerceString,
|
||||||
SupportedOperations: []bexpr.MatchOperator{bexpr.MatchEqual, bexpr.MatchNotEqual},
|
SupportedOperations: []bexpr.MatchOperator{bexpr.MatchEqual, bexpr.MatchNotEqual, bexpr.MatchIn, bexpr.MatchNotIn, bexpr.MatchMatches, bexpr.MatchNotMatches},
|
||||||
},
|
},
|
||||||
"MeshGateway": &bexpr.FieldConfiguration{
|
"MeshGateway": &bexpr.FieldConfiguration{
|
||||||
StructFieldName: "MeshGateway",
|
StructFieldName: "MeshGateway",
|
||||||
@ -213,6 +213,11 @@ var expectedFieldConfigConnectProxyConfig bexpr.FieldConfigurations = bexpr.Fiel
|
|||||||
CoerceFn: bexpr.CoerceInt,
|
CoerceFn: bexpr.CoerceInt,
|
||||||
SupportedOperations: []bexpr.MatchOperator{bexpr.MatchEqual, bexpr.MatchNotEqual},
|
SupportedOperations: []bexpr.MatchOperator{bexpr.MatchEqual, bexpr.MatchNotEqual},
|
||||||
},
|
},
|
||||||
|
"LocalServiceSocketPath": &bexpr.FieldConfiguration{
|
||||||
|
StructFieldName: "LocalServiceSocketPath",
|
||||||
|
CoerceFn: bexpr.CoerceString,
|
||||||
|
SupportedOperations: []bexpr.MatchOperator{bexpr.MatchEqual, bexpr.MatchNotEqual, bexpr.MatchIn, bexpr.MatchNotIn, bexpr.MatchMatches, bexpr.MatchNotMatches},
|
||||||
|
},
|
||||||
"Upstreams": &bexpr.FieldConfiguration{
|
"Upstreams": &bexpr.FieldConfiguration{
|
||||||
StructFieldName: "Upstreams",
|
StructFieldName: "Upstreams",
|
||||||
SupportedOperations: []bexpr.MatchOperator{bexpr.MatchIsEmpty, bexpr.MatchIsNotEmpty},
|
SupportedOperations: []bexpr.MatchOperator{bexpr.MatchIsEmpty, bexpr.MatchIsNotEmpty},
|
||||||
@ -366,6 +371,11 @@ var expectedFieldConfigNodeService bexpr.FieldConfigurations = bexpr.FieldConfig
|
|||||||
CoerceFn: bexpr.CoerceInt,
|
CoerceFn: bexpr.CoerceInt,
|
||||||
SupportedOperations: []bexpr.MatchOperator{bexpr.MatchEqual, bexpr.MatchNotEqual},
|
SupportedOperations: []bexpr.MatchOperator{bexpr.MatchEqual, bexpr.MatchNotEqual},
|
||||||
},
|
},
|
||||||
|
"SocketPath": &bexpr.FieldConfiguration{
|
||||||
|
StructFieldName: "SocketPath",
|
||||||
|
CoerceFn: bexpr.CoerceString,
|
||||||
|
SupportedOperations: []bexpr.MatchOperator{bexpr.MatchEqual, bexpr.MatchNotEqual, bexpr.MatchIn, bexpr.MatchNotIn, bexpr.MatchMatches, bexpr.MatchNotMatches},
|
||||||
|
},
|
||||||
"Weights": &bexpr.FieldConfiguration{
|
"Weights": &bexpr.FieldConfiguration{
|
||||||
StructFieldName: "Weights",
|
StructFieldName: "Weights",
|
||||||
SubFields: expectedFieldConfigWeights,
|
SubFields: expectedFieldConfigWeights,
|
||||||
@ -460,6 +470,11 @@ var expectedFieldConfigServiceNode bexpr.FieldConfigurations = bexpr.FieldConfig
|
|||||||
CoerceFn: bexpr.CoerceInt,
|
CoerceFn: bexpr.CoerceInt,
|
||||||
SupportedOperations: []bexpr.MatchOperator{bexpr.MatchEqual, bexpr.MatchNotEqual},
|
SupportedOperations: []bexpr.MatchOperator{bexpr.MatchEqual, bexpr.MatchNotEqual},
|
||||||
},
|
},
|
||||||
|
"ServiceSocketPath": &bexpr.FieldConfiguration{
|
||||||
|
StructFieldName: "ServiceSocketPath",
|
||||||
|
CoerceFn: bexpr.CoerceString,
|
||||||
|
SupportedOperations: []bexpr.MatchOperator{bexpr.MatchEqual, bexpr.MatchNotEqual, bexpr.MatchIn, bexpr.MatchNotIn, bexpr.MatchMatches, bexpr.MatchNotMatches},
|
||||||
|
},
|
||||||
"ServiceWeights": &bexpr.FieldConfiguration{
|
"ServiceWeights": &bexpr.FieldConfiguration{
|
||||||
StructFieldName: "ServiceWeights",
|
StructFieldName: "ServiceWeights",
|
||||||
SubFields: expectedFieldConfigWeights,
|
SubFields: expectedFieldConfigWeights,
|
||||||
|
@ -663,7 +663,7 @@ func TestStructs_NodeService_ValidateConnectProxy(t *testing.T) {
|
|||||||
{
|
{
|
||||||
"connect-proxy: no port set",
|
"connect-proxy: no port set",
|
||||||
func(x *NodeService) { x.Port = 0 },
|
func(x *NodeService) { x.Port = 0 },
|
||||||
"Port must",
|
"port or socketpath must",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -82,6 +82,7 @@ type AgentService struct {
|
|||||||
Meta map[string]string
|
Meta map[string]string
|
||||||
Port int
|
Port int
|
||||||
Address string
|
Address string
|
||||||
|
SocketPath string
|
||||||
TaggedAddresses map[string]ServiceAddress `json:",omitempty"`
|
TaggedAddresses map[string]ServiceAddress `json:",omitempty"`
|
||||||
Weights AgentWeights
|
Weights AgentWeights
|
||||||
EnableTagOverride bool
|
EnableTagOverride bool
|
||||||
|
@ -741,7 +741,7 @@ func TestAPI_AgentService(t *testing.T) {
|
|||||||
ID: "foo",
|
ID: "foo",
|
||||||
Service: "foo",
|
Service: "foo",
|
||||||
Tags: []string{"bar", "baz"},
|
Tags: []string{"bar", "baz"},
|
||||||
ContentHash: "6b13684bfe179e67",
|
ContentHash: "f72563cae6924fb5",
|
||||||
Port: 8000,
|
Port: 8000,
|
||||||
Weights: AgentWeights{
|
Weights: AgentWeights{
|
||||||
Passing: 1,
|
Passing: 1,
|
||||||
|
@ -36,6 +36,7 @@ func NodeServiceToStructs(s NodeService) structs.NodeService {
|
|||||||
t.TaggedAddresses = MapStringServiceAddressToStructs(s.TaggedAddresses)
|
t.TaggedAddresses = MapStringServiceAddressToStructs(s.TaggedAddresses)
|
||||||
t.Meta = s.Meta
|
t.Meta = s.Meta
|
||||||
t.Port = int(s.Port)
|
t.Port = int(s.Port)
|
||||||
|
t.SocketPath = s.SocketPath
|
||||||
t.Weights = WeightsPtrToStructs(s.Weights)
|
t.Weights = WeightsPtrToStructs(s.Weights)
|
||||||
t.EnableTagOverride = s.EnableTagOverride
|
t.EnableTagOverride = s.EnableTagOverride
|
||||||
t.Proxy = ConnectProxyConfigToStructs(s.Proxy)
|
t.Proxy = ConnectProxyConfigToStructs(s.Proxy)
|
||||||
@ -55,6 +56,7 @@ func NewNodeServiceFromStructs(t structs.NodeService) NodeService {
|
|||||||
s.TaggedAddresses = NewMapStringServiceAddressFromStructs(t.TaggedAddresses)
|
s.TaggedAddresses = NewMapStringServiceAddressFromStructs(t.TaggedAddresses)
|
||||||
s.Meta = t.Meta
|
s.Meta = t.Meta
|
||||||
s.Port = int32(t.Port)
|
s.Port = int32(t.Port)
|
||||||
|
s.SocketPath = t.SocketPath
|
||||||
s.Weights = NewWeightsPtrFromStructs(t.Weights)
|
s.Weights = NewWeightsPtrFromStructs(t.Weights)
|
||||||
s.EnableTagOverride = t.EnableTagOverride
|
s.EnableTagOverride = t.EnableTagOverride
|
||||||
s.Proxy = NewConnectProxyConfigFromStructs(t.Proxy)
|
s.Proxy = NewConnectProxyConfigFromStructs(t.Proxy)
|
||||||
|
@ -139,6 +139,7 @@ type NodeService struct {
|
|||||||
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"`
|
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
|
// mog: func-to=int func-from=int32
|
||||||
Port int32 `protobuf:"varint,7,opt,name=Port,proto3" json:"Port,omitempty"`
|
Port int32 `protobuf:"varint,7,opt,name=Port,proto3" json:"Port,omitempty"`
|
||||||
|
SocketPath string `protobuf:"bytes,17,opt,name=SocketPath,proto3" json:"SocketPath,omitempty"`
|
||||||
// mog: func-to=WeightsPtrToStructs func-from=NewWeightsPtrFromStructs
|
// mog: func-to=WeightsPtrToStructs func-from=NewWeightsPtrFromStructs
|
||||||
Weights *Weights `protobuf:"bytes,8,opt,name=Weights,proto3" json:"Weights,omitempty"`
|
Weights *Weights `protobuf:"bytes,8,opt,name=Weights,proto3" json:"Weights,omitempty"`
|
||||||
EnableTagOverride bool `protobuf:"varint,9,opt,name=EnableTagOverride,proto3" json:"EnableTagOverride,omitempty"`
|
EnableTagOverride bool `protobuf:"varint,9,opt,name=EnableTagOverride,proto3" json:"EnableTagOverride,omitempty"`
|
||||||
@ -226,54 +227,55 @@ func init() {
|
|||||||
func init() { proto.RegisterFile("proto/pbservice/node.proto", fileDescriptor_bbc215b78fa95fe5) }
|
func init() { proto.RegisterFile("proto/pbservice/node.proto", fileDescriptor_bbc215b78fa95fe5) }
|
||||||
|
|
||||||
var fileDescriptor_bbc215b78fa95fe5 = []byte{
|
var fileDescriptor_bbc215b78fa95fe5 = []byte{
|
||||||
// 741 bytes of a gzipped FileDescriptorProto
|
// 757 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4d, 0x4f, 0x1b, 0x3b,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x4e, 0x1b, 0x3b,
|
||||||
0x14, 0xcd, 0x24, 0x13, 0x42, 0xcc, 0x7b, 0x7c, 0x58, 0xe8, 0xc9, 0x2f, 0x4f, 0x4c, 0xf2, 0x68,
|
0x14, 0xce, 0x24, 0x13, 0x42, 0xcc, 0xbd, 0xfc, 0x58, 0xe8, 0xca, 0x37, 0x57, 0x4c, 0x72, 0x69,
|
||||||
0x17, 0x48, 0xd0, 0x99, 0xaa, 0x1f, 0x6a, 0x53, 0x55, 0x95, 0x08, 0x41, 0x6a, 0xd4, 0x42, 0xd1,
|
0x17, 0x48, 0xd0, 0x99, 0xaa, 0x3f, 0x6a, 0x53, 0x55, 0x95, 0x08, 0x41, 0x6a, 0xd4, 0x42, 0xd1,
|
||||||
0x80, 0x54, 0xa9, 0x55, 0x17, 0xce, 0x8c, 0x99, 0x8c, 0x08, 0xe3, 0xc8, 0x76, 0x10, 0xf9, 0x03,
|
0x80, 0x54, 0xa9, 0x55, 0x17, 0xce, 0x8c, 0x99, 0x19, 0x11, 0xc6, 0x91, 0xed, 0x20, 0xf2, 0x16,
|
||||||
0x5d, 0x77, 0xd9, 0xfe, 0x23, 0xba, 0x63, 0xd9, 0x55, 0xd4, 0x92, 0x7f, 0xc1, 0xaa, 0xb2, 0xc7,
|
0x5d, 0xb6, 0x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b6, 0xed, 0xd1, 0x63, 0x27, 0xc4, 0x3c, 0x8c, 0x3c, 0xca, 0xba, 0x8e,
|
||||||
0xd1, 0x88, 0xf7, 0xbb, 0x8e, 0x18, 0xf4, 0x08, 0x57, 0x0d, 0xb4, 0x9a, 0x6e, 0xbe, 0xd5, 0x84,
|
0x47, 0x63, 0xde, 0xeb, 0x38, 0xa2, 0xdf, 0x25, 0x5c, 0x35, 0xd0, 0x6a, 0xba, 0xf9, 0x56, 0x13,
|
||||||
0x50, 0xdf, 0x46, 0x76, 0x59, 0xd6, 0xcd, 0x23, 0x50, 0xda, 0xf4, 0x7d, 0x46, 0xb8, 0xec, 0x45,
|
0x42, 0x7d, 0x1b, 0xd9, 0x65, 0x59, 0x37, 0x8f, 0x40, 0x69, 0xd3, 0xf7, 0x19, 0xe1, 0xb2, 0x17,
|
||||||
0x86, 0x93, 0x4f, 0x68, 0x01, 0xd0, 0xc4, 0x02, 0x7b, 0x24, 0x12, 0x84, 0x21, 0x53, 0x25, 0x53,
|
0x19, 0x1e, 0x7d, 0x42, 0x0b, 0x80, 0x26, 0x16, 0xd8, 0x23, 0xb1, 0x20, 0x0c, 0x99, 0x2a, 0x99,
|
||||||
0x11, 0xb8, 0x0b, 0x16, 0x0e, 0x70, 0x10, 0x10, 0x5f, 0x17, 0x10, 0x8e, 0x8a, 0xea, 0x36, 0x77,
|
0x8a, 0xc0, 0x5d, 0xb0, 0x70, 0x80, 0x83, 0x80, 0xf8, 0xba, 0x80, 0x70, 0x54, 0x54, 0xb7, 0xb9,
|
||||||
0x33, 0xd7, 0xb7, 0x33, 0xb0, 0xed, 0x48, 0xb0, 0x81, 0x9b, 0x2d, 0x86, 0xf7, 0x80, 0xb9, 0x43,
|
0x9b, 0xb9, 0xbe, 0x9d, 0x81, 0x6d, 0xc7, 0x82, 0xf5, 0xdd, 0x6c, 0x31, 0xbc, 0x07, 0xcc, 0x1d,
|
||||||
0x04, 0x46, 0x33, 0x8a, 0xe4, 0xdf, 0x2c, 0x89, 0xcc, 0xc5, 0x95, 0x0a, 0x06, 0xeb, 0xa0, 0xec,
|
0x22, 0x30, 0x9a, 0x51, 0x24, 0xff, 0x66, 0x49, 0x64, 0x2e, 0xa9, 0x54, 0x30, 0x58, 0x07, 0x65,
|
||||||
0xe2, 0x43, 0xd1, 0x8a, 0x7c, 0x72, 0x8a, 0x4a, 0xea, 0xdd, 0x97, 0x6c, 0xed, 0x94, 0x71, 0xa2,
|
0x17, 0x1f, 0x8a, 0x56, 0xec, 0x93, 0x53, 0x54, 0x52, 0xef, 0xbe, 0x64, 0x6b, 0xa7, 0x8c, 0x13,
|
||||||
0x31, 0x7b, 0x36, 0xac, 0xe6, 0xce, 0x87, 0x55, 0xc3, 0xbd, 0x42, 0x57, 0x1a, 0x60, 0x79, 0x5a,
|
0x8d, 0xd9, 0xb3, 0x41, 0x35, 0x77, 0x3e, 0xa8, 0x1a, 0xee, 0x15, 0xba, 0xd2, 0x00, 0xcb, 0xd3,
|
||||||
0x4b, 0x70, 0x11, 0x14, 0x8e, 0xc8, 0x20, 0x7e, 0x5e, 0x57, 0x6e, 0xe1, 0x32, 0x28, 0x9e, 0xe0,
|
0x5a, 0x82, 0x8b, 0xa0, 0x70, 0x44, 0xfa, 0xc9, 0xf3, 0xba, 0x72, 0x0b, 0x97, 0x41, 0xf1, 0x04,
|
||||||
0x6e, 0x3f, 0x79, 0xb2, 0xf8, 0xe3, 0x59, 0xfe, 0xa9, 0x51, 0x79, 0x02, 0xca, 0xe3, 0x8e, 0x6e,
|
0x77, 0x7a, 0xa3, 0x27, 0x4b, 0x3e, 0x9e, 0xe5, 0x9f, 0x1a, 0x95, 0x27, 0xa0, 0x3c, 0xee, 0xe8,
|
||||||
0x53, 0xb8, 0xfa, 0xb1, 0x04, 0xe6, 0x52, 0xa6, 0x80, 0x3b, 0xc0, 0x7c, 0x15, 0x46, 0xbe, 0x16,
|
0x36, 0x85, 0xab, 0x5f, 0x4a, 0x60, 0x2e, 0x65, 0x0a, 0xb8, 0x03, 0xcc, 0x57, 0x51, 0xec, 0x6b,
|
||||||
0xb5, 0x7e, 0x39, 0xac, 0x3e, 0xbe, 0x49, 0x54, 0x1c, 0x90, 0x48, 0x38, 0x5c, 0xb0, 0xbe, 0x27,
|
0x51, 0xeb, 0x97, 0x83, 0xea, 0xe3, 0x9b, 0x44, 0xc5, 0x01, 0x89, 0x85, 0xc3, 0x05, 0xeb, 0x79,
|
||||||
0xb8, 0xad, 0x49, 0x24, 0x81, 0xab, 0x68, 0xe0, 0xbc, 0x72, 0x48, 0x7c, 0xaa, 0xd4, 0x1c, 0x5d,
|
0x82, 0xdb, 0x9a, 0x44, 0x12, 0xb8, 0x8a, 0x06, 0xce, 0x2b, 0x87, 0x24, 0xa7, 0x4a, 0xcd, 0xd1,
|
||||||
0x99, 0x53, 0xeb, 0x9b, 0x1c, 0x0c, 0x81, 0x79, 0x80, 0x03, 0x8e, 0xcc, 0x5a, 0x41, 0xba, 0x41,
|
0x95, 0x39, 0xb5, 0xbe, 0xa3, 0x83, 0x21, 0x30, 0x0f, 0x70, 0xc0, 0x91, 0x59, 0x2b, 0x48, 0x37,
|
||||||
0xee, 0xd3, 0x6e, 0x28, 0x4e, 0xba, 0xe1, 0xfd, 0x75, 0xb5, 0x17, 0x94, 0x50, 0xeb, 0xd3, 0xcd,
|
0xc8, 0x7d, 0xda, 0x0d, 0xc5, 0x49, 0x37, 0xbc, 0xbf, 0xae, 0xf6, 0x82, 0x12, 0x6a, 0x7d, 0xba,
|
||||||
0x3e, 0x55, 0xf4, 0x86, 0x29, 0xe5, 0xb8, 0x2e, 0xfd, 0xa3, 0x09, 0xe9, 0x6b, 0xbf, 0x60, 0xcc,
|
0xd9, 0xa7, 0x8a, 0xde, 0x30, 0xa5, 0x1c, 0xd7, 0xa5, 0x7f, 0x34, 0x21, 0x7d, 0xed, 0x17, 0x8c,
|
||||||
0x3a, 0x00, 0x02, 0x73, 0x8f, 0x32, 0xa1, 0xc4, 0x2f, 0xba, 0x6a, 0x0f, 0x37, 0x40, 0xe9, 0x2d,
|
0x59, 0x07, 0x40, 0x60, 0xee, 0x51, 0x26, 0x94, 0xf8, 0x45, 0x57, 0xed, 0xa5, 0x69, 0xf7, 0xa9,
|
||||||
0x09, 0x83, 0x8e, 0xe0, 0x68, 0x56, 0x79, 0x02, 0xa6, 0xc8, 0x74, 0xc6, 0x4d, 0x20, 0x70, 0x03,
|
0x77, 0x44, 0xc4, 0x1e, 0x16, 0x21, 0x5a, 0x4a, 0x4c, 0x7b, 0x15, 0x81, 0x1b, 0xa0, 0xf4, 0x96,
|
||||||
0x2c, 0x6d, 0x47, 0xb8, 0xdd, 0x25, 0x07, 0x38, 0x78, 0x73, 0x42, 0x18, 0x0b, 0x7d, 0x82, 0xca,
|
0x44, 0x41, 0x28, 0x38, 0x9a, 0x55, 0x9e, 0x81, 0xa9, 0xc3, 0x74, 0xc6, 0x1d, 0x41, 0xe0, 0x06,
|
||||||
0x35, 0x63, 0x6d, 0xd6, 0xbd, 0x9e, 0x80, 0x75, 0x50, 0xdc, 0x63, 0xf4, 0x74, 0x80, 0xe6, 0x14,
|
0x58, 0xda, 0x8e, 0x71, 0xbb, 0x43, 0x0e, 0x70, 0xf0, 0xe6, 0x84, 0x30, 0x16, 0xf9, 0x04, 0x95,
|
||||||
0xf3, 0x4a, 0x8a, 0x79, 0x8b, 0x46, 0x11, 0xf1, 0x84, 0x4a, 0x6f, 0xd1, 0xe8, 0x30, 0x0c, 0xf4,
|
0x6b, 0xc6, 0xda, 0xac, 0x7b, 0x3d, 0x01, 0xeb, 0xa0, 0xb8, 0xc7, 0xe8, 0x69, 0x1f, 0xcd, 0x29,
|
||||||
0x55, 0xe3, 0x0a, 0x58, 0x07, 0x25, 0x0d, 0x41, 0x7f, 0xa9, 0xe2, 0xb4, 0xbd, 0xf5, 0xfd, 0x34,
|
0xe6, 0x95, 0x14, 0xf3, 0x16, 0x8d, 0x63, 0xe2, 0x09, 0x95, 0xde, 0xa2, 0xf1, 0x61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a7, 0x91, 0x95,
|
0x7b, 0x1a, 0x9d, 0xf4, 0x50, 0x4d, 0x7d, 0x23, 0x4d, 0xf1, 0x27, 0x06, 0xb5, 0xb1, 0x73, 0xf6,
|
||||||
0xfb, 0x3c, 0xb2, 0x72, 0xe7, 0x23, 0x2b, 0xf7, 0x6d, 0x64, 0xe5, 0xde, 0xad, 0xdf, 0x34, 0x88,
|
0xc3, 0xca, 0x9d, 0x5d, 0x58, 0xc6, 0xf9, 0x85, 0x65, 0x7c, 0xbf, 0xb0, 0x8c, 0x8f, 0x43, 0x2b,
|
||||||
0x99, 0xff, 0x98, 0xf6, 0x8c, 0x0a, 0x3c, 0xfc, 0x19, 0x00, 0x00, 0xff, 0xff, 0x94, 0x92, 0x8e,
|
0xf7, 0x69, 0x68, 0xe5, 0xce, 0x87, 0x56, 0xee, 0xdb, 0xd0, 0xca, 0xbd, 0x5b, 0xbf, 0x69, 0x50,
|
||||||
0x95, 0xe4, 0x06, 0x00, 0x00,
|
0x33, 0xff, 0x41, 0xed, 0x19, 0x15, 0x78, 0xf8, 0x33, 0x00, 0x00, 0xff, 0xff, 0x17, 0xe3, 0xec,
|
||||||
|
0x0a, 0x04, 0x07, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *CheckServiceNode) Marshal() (dAtA []byte, err error) {
|
func (m *CheckServiceNode) Marshal() (dAtA []byte, err error) {
|
||||||
@ -456,6 +458,15 @@ func (m *NodeService) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
|
if len(m.SocketPath) > 0 {
|
||||||
|
i -= len(m.SocketPath)
|
||||||
|
copy(dAtA[i:], m.SocketPath)
|
||||||
|
i = encodeVarintNode(dAtA, i, uint64(len(m.SocketPath)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x1
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x8a
|
||||||
|
}
|
||||||
{
|
{
|
||||||
size, err := m.EnterpriseMeta.MarshalToSizedBuffer(dAtA[:i])
|
size, err := m.EnterpriseMeta.MarshalToSizedBuffer(dAtA[:i])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -761,6 +772,10 @@ func (m *NodeService) Size() (n int) {
|
|||||||
}
|
}
|
||||||
l = m.EnterpriseMeta.Size()
|
l = m.EnterpriseMeta.Size()
|
||||||
n += 2 + l + sovNode(uint64(l))
|
n += 2 + l + sovNode(uint64(l))
|
||||||
|
l = len(m.SocketPath)
|
||||||
|
if l > 0 {
|
||||||
|
n += 2 + l + sovNode(uint64(l))
|
||||||
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2069,6 +2084,38 @@ func (m *NodeService) Unmarshal(dAtA []byte) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
|
case 17:
|
||||||
|
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 ErrIntOverflowNode
|
||||||
|
}
|
||||||
|
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 ErrInvalidLengthNode
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthNode
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.SocketPath = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := skipNode(dAtA[iNdEx:])
|
skippy, err := skipNode(dAtA[iNdEx:])
|
||||||
|
@ -66,6 +66,7 @@ message NodeService {
|
|||||||
map<string, string> Meta = 6;
|
map<string, string> Meta = 6;
|
||||||
// mog: func-to=int func-from=int32
|
// mog: func-to=int func-from=int32
|
||||||
int32 Port = 7;
|
int32 Port = 7;
|
||||||
|
string SocketPath = 17;
|
||||||
|
|
||||||
// mog: func-to=WeightsPtrToStructs func-from=NewWeightsPtrFromStructs
|
// mog: func-to=WeightsPtrToStructs func-from=NewWeightsPtrFromStructs
|
||||||
Weights Weights = 8;
|
Weights Weights = 8;
|
||||||
|
@ -96,6 +96,7 @@ func ServiceDefinitionToStructs(s ServiceDefinition) structs.ServiceDefinition {
|
|||||||
t.TaggedAddresses = MapStringServiceAddressToStructs(s.TaggedAddresses)
|
t.TaggedAddresses = MapStringServiceAddressToStructs(s.TaggedAddresses)
|
||||||
t.Meta = s.Meta
|
t.Meta = s.Meta
|
||||||
t.Port = int(s.Port)
|
t.Port = int(s.Port)
|
||||||
|
t.SocketPath = s.SocketPath
|
||||||
t.Check = CheckTypeToStructs(s.Check)
|
t.Check = CheckTypeToStructs(s.Check)
|
||||||
t.Checks = CheckTypesToStructs(s.Checks)
|
t.Checks = CheckTypesToStructs(s.Checks)
|
||||||
t.Weights = WeightsPtrToStructs(s.Weights)
|
t.Weights = WeightsPtrToStructs(s.Weights)
|
||||||
@ -116,6 +117,7 @@ func NewServiceDefinitionFromStructs(t structs.ServiceDefinition) ServiceDefinit
|
|||||||
s.TaggedAddresses = NewMapStringServiceAddressFromStructs(t.TaggedAddresses)
|
s.TaggedAddresses = NewMapStringServiceAddressFromStructs(t.TaggedAddresses)
|
||||||
s.Meta = t.Meta
|
s.Meta = t.Meta
|
||||||
s.Port = int32(t.Port)
|
s.Port = int32(t.Port)
|
||||||
|
s.SocketPath = t.SocketPath
|
||||||
s.Check = NewCheckTypeFromStructs(t.Check)
|
s.Check = NewCheckTypeFromStructs(t.Check)
|
||||||
s.Checks = NewCheckTypesFromStructs(t.Checks)
|
s.Checks = NewCheckTypesFromStructs(t.Checks)
|
||||||
s.Weights = NewWeightsPtrFromStructs(t.Weights)
|
s.Weights = NewWeightsPtrFromStructs(t.Weights)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user