fix protobufs for socketpath and re-mogrify

pull/10185/head
R.B. Boyer 4 years ago committed by Mark Anderson
parent f808a25a73
commit c8af6741d7

@ -36,6 +36,7 @@ func NodeServiceToStructs(s NodeService) structs.NodeService {
t.TaggedAddresses = MapStringServiceAddressToStructs(s.TaggedAddresses)
t.Meta = s.Meta
t.Port = int(s.Port)
t.SocketPath = s.SocketPath
t.Weights = WeightsPtrToStructs(s.Weights)
t.EnableTagOverride = s.EnableTagOverride
t.Proxy = ConnectProxyConfigToStructs(s.Proxy)
@ -55,6 +56,7 @@ func NewNodeServiceFromStructs(t structs.NodeService) NodeService {
s.TaggedAddresses = NewMapStringServiceAddressFromStructs(t.TaggedAddresses)
s.Meta = t.Meta
s.Port = int32(t.Port)
s.SocketPath = t.SocketPath
s.Weights = NewWeightsPtrFromStructs(t.Weights)
s.EnableTagOverride = t.EnableTagOverride
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"`
// mog: func-to=int func-from=int32
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
Weights *Weights `protobuf:"bytes,8,opt,name=Weights,proto3" json:"Weights,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) }
var fileDescriptor_bbc215b78fa95fe5 = []byte{
// 741 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff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75, 0x50, 0xdc, 0x63, 0xf4, 0x74, 0x80, 0xe6, 0x14,
0xf3, 0x4a, 0x8a, 0x79, 0x8b, 0x46, 0x11, 0xf1, 0x84, 0x4a, 0x6f, 0xd1, 0xe8, 0x30, 0x0c, 0xf4,
0x55, 0xe3, 0x0a, 0x58, 0x07, 0x25, 0x0d, 0x41, 0x7f, 0xa9, 0xe2, 0xb4, 0xbd, 0xf5, 0xfd, 0x34,
0x40, 0x17, 0x26, 0x78, 0xf8, 0x02, 0x54, 0x5e, 0x53, 0x0f, 0x77, 0xbb, 0x03, 0x97, 0x04, 0x21,
0x17, 0x84, 0x11, 0x7f, 0x93, 0xef, 0x87, 0x3e, 0xf1, 0x30, 0x43, 0x7f, 0xab, 0x66, 0x6f, 0x40,
0xc0, 0x26, 0x98, 0xdf, 0x96, 0xf3, 0xda, 0x63, 0x21, 0x27, 0xea, 0x95, 0x17, 0xf5, 0x8f, 0x94,
0x1e, 0x96, 0xc9, 0xac, 0x3e, 0x3e, 0x53, 0x33, 0x39, 0x6d, 0xf3, 0xb7, 0x9a, 0xb6, 0x0f, 0xbf,
0x3d, 0x6d, 0x4e, 0x7a, 0x68, 0xa6, 0xbe, 0x91, 0xa6, 0xf8, 0x13, 0x83, 0xd8, 0xd8, 0x39, 0xfb,
0x61, 0xe5, 0xce, 0x2e, 0x2c, 0xe3, 0xfc, 0xc2, 0x32, 0xbe, 0x5f, 0x58, 0xc6, 0xa7, 0x91, 0x95,
0xfb, 0x3c, 0xb2, 0x72, 0xe7, 0x23, 0x2b, 0xf7, 0x6d, 0x64, 0xe5, 0xde, 0xad, 0xdf, 0x34, 0x88,
0x99, 0xff, 0x98, 0xf6, 0x8c, 0x0a, 0x3c, 0xfc, 0x19, 0x00, 0x00, 0xff, 0xff, 0x94, 0x92, 0x8e,
0x95, 0xe4, 0x06, 0x00, 0x00,
// 757 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 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0x0a, 0x04, 0x07, 0x00, 0x00,
}
func (m *CheckServiceNode) Marshal() (dAtA []byte, err error) {
@ -456,6 +458,15 @@ func (m *NodeService) 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 = encodeVarintNode(dAtA, i, uint64(len(m.SocketPath)))
i--
dAtA[i] = 0x1
i--
dAtA[i] = 0x8a
}
{
size, err := m.EnterpriseMeta.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
@ -761,6 +772,10 @@ func (m *NodeService) Size() (n int) {
}
l = m.EnterpriseMeta.Size()
n += 2 + l + sovNode(uint64(l))
l = len(m.SocketPath)
if l > 0 {
n += 2 + l + sovNode(uint64(l))
}
return n
}
@ -2069,6 +2084,38 @@ func (m *NodeService) Unmarshal(dAtA []byte) error {
return err
}
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:
iNdEx = preIndex
skippy, err := skipNode(dAtA[iNdEx:])

@ -66,6 +66,7 @@ message NodeService {
map<string, string> Meta = 6;
// mog: func-to=int func-from=int32
int32 Port = 7;
string SocketPath = 17;
// mog: func-to=WeightsPtrToStructs func-from=NewWeightsPtrFromStructs
Weights Weights = 8;

@ -96,6 +96,7 @@ func ServiceDefinitionToStructs(s ServiceDefinition) structs.ServiceDefinition {
t.TaggedAddresses = MapStringServiceAddressToStructs(s.TaggedAddresses)
t.Meta = s.Meta
t.Port = int(s.Port)
t.SocketPath = s.SocketPath
t.Check = CheckTypeToStructs(s.Check)
t.Checks = CheckTypesToStructs(s.Checks)
t.Weights = WeightsPtrToStructs(s.Weights)
@ -116,6 +117,7 @@ func NewServiceDefinitionFromStructs(t structs.ServiceDefinition) ServiceDefinit
s.TaggedAddresses = NewMapStringServiceAddressFromStructs(t.TaggedAddresses)
s.Meta = t.Meta
s.Port = int32(t.Port)
s.SocketPath = t.SocketPath
s.Check = NewCheckTypeFromStructs(t.Check)
s.Checks = NewCheckTypesFromStructs(t.Checks)
s.Weights = NewWeightsPtrFromStructs(t.Weights)

Loading…
Cancel
Save