linkerd2/controller/gen/proxy/destination/destination.pb.go

421 lines
14 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: proxy/destination/destination.proto
/*
Package conduit_proxy_destination is a generated protocol buffer package.
It is generated from these files:
proxy/destination/destination.proto
It has these top-level messages:
Update
AddrSet
WeightedAddrSet
WeightedAddr
NoEndpoints
*/
package conduit_proxy_destination
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import conduit_common "github.com/runconduit/conduit/controller/gen/common"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type Update struct {
// Types that are valid to be assigned to Update:
// *Update_Add
// *Update_Remove
// *Update_NoEndpoints
Update isUpdate_Update `protobuf_oneof:"update"`
}
func (m *Update) Reset() { *m = Update{} }
func (m *Update) String() string { return proto.CompactTextString(m) }
func (*Update) ProtoMessage() {}
func (*Update) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type isUpdate_Update interface{ isUpdate_Update() }
type Update_Add struct {
Add *WeightedAddrSet `protobuf:"bytes,1,opt,name=add,oneof"`
}
type Update_Remove struct {
Remove *AddrSet `protobuf:"bytes,2,opt,name=remove,oneof"`
}
type Update_NoEndpoints struct {
NoEndpoints *NoEndpoints `protobuf:"bytes,3,opt,name=no_endpoints,json=noEndpoints,oneof"`
}
func (*Update_Add) isUpdate_Update() {}
func (*Update_Remove) isUpdate_Update() {}
func (*Update_NoEndpoints) isUpdate_Update() {}
func (m *Update) GetUpdate() isUpdate_Update {
if m != nil {
return m.Update
}
return nil
}
func (m *Update) GetAdd() *WeightedAddrSet {
if x, ok := m.GetUpdate().(*Update_Add); ok {
return x.Add
}
return nil
}
func (m *Update) GetRemove() *AddrSet {
if x, ok := m.GetUpdate().(*Update_Remove); ok {
return x.Remove
}
return nil
}
func (m *Update) GetNoEndpoints() *NoEndpoints {
if x, ok := m.GetUpdate().(*Update_NoEndpoints); ok {
return x.NoEndpoints
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Update) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Update_OneofMarshaler, _Update_OneofUnmarshaler, _Update_OneofSizer, []interface{}{
(*Update_Add)(nil),
(*Update_Remove)(nil),
(*Update_NoEndpoints)(nil),
}
}
func _Update_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Update)
// update
switch x := m.Update.(type) {
case *Update_Add:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Add); err != nil {
return err
}
case *Update_Remove:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Remove); err != nil {
return err
}
case *Update_NoEndpoints:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.NoEndpoints); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Update.Update has unexpected type %T", x)
}
return nil
}
func _Update_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Update)
switch tag {
case 1: // update.add
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(WeightedAddrSet)
err := b.DecodeMessage(msg)
m.Update = &Update_Add{msg}
return true, err
case 2: // update.remove
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(AddrSet)
err := b.DecodeMessage(msg)
m.Update = &Update_Remove{msg}
return true, err
case 3: // update.no_endpoints
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(NoEndpoints)
err := b.DecodeMessage(msg)
m.Update = &Update_NoEndpoints{msg}
return true, err
default:
return false, nil
}
}
func _Update_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Update)
// update
switch x := m.Update.(type) {
case *Update_Add:
s := proto.Size(x.Add)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Update_Remove:
s := proto.Size(x.Remove)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Update_NoEndpoints:
s := proto.Size(x.NoEndpoints)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
type AddrSet struct {
Addrs []*conduit_common.TcpAddress `protobuf:"bytes,1,rep,name=addrs" json:"addrs,omitempty"`
}
func (m *AddrSet) Reset() { *m = AddrSet{} }
func (m *AddrSet) String() string { return proto.CompactTextString(m) }
func (*AddrSet) ProtoMessage() {}
func (*AddrSet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *AddrSet) GetAddrs() []*conduit_common.TcpAddress {
if m != nil {
return m.Addrs
}
return nil
}
type WeightedAddrSet struct {
Addrs []*WeightedAddr `protobuf:"bytes,1,rep,name=addrs" json:"addrs,omitempty"`
MetricLabels map[string]string `protobuf:"bytes,2,rep,name=metric_labels,json=metricLabels" json:"metric_labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
func (m *WeightedAddrSet) Reset() { *m = WeightedAddrSet{} }
func (m *WeightedAddrSet) String() string { return proto.CompactTextString(m) }
func (*WeightedAddrSet) ProtoMessage() {}
func (*WeightedAddrSet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *WeightedAddrSet) GetAddrs() []*WeightedAddr {
if m != nil {
return m.Addrs
}
return nil
}
func (m *WeightedAddrSet) GetMetricLabels() map[string]string {
if m != nil {
return m.MetricLabels
}
return nil
}
type WeightedAddr struct {
Addr *conduit_common.TcpAddress `protobuf:"bytes,1,opt,name=addr" json:"addr,omitempty"`
Weight uint32 `protobuf:"varint,3,opt,name=weight" json:"weight,omitempty"`
MetricLabels map[string]string `protobuf:"bytes,4,rep,name=metric_labels,json=metricLabels" json:"metric_labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
func (m *WeightedAddr) Reset() { *m = WeightedAddr{} }
func (m *WeightedAddr) String() string { return proto.CompactTextString(m) }
func (*WeightedAddr) ProtoMessage() {}
func (*WeightedAddr) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *WeightedAddr) GetAddr() *conduit_common.TcpAddress {
if m != nil {
return m.Addr
}
return nil
}
func (m *WeightedAddr) GetWeight() uint32 {
if m != nil {
return m.Weight
}
return 0
}
func (m *WeightedAddr) GetMetricLabels() map[string]string {
if m != nil {
return m.MetricLabels
}
return nil
}
type NoEndpoints struct {
Exists bool `protobuf:"varint,1,opt,name=exists" json:"exists,omitempty"`
}
func (m *NoEndpoints) Reset() { *m = NoEndpoints{} }
func (m *NoEndpoints) String() string { return proto.CompactTextString(m) }
func (*NoEndpoints) ProtoMessage() {}
func (*NoEndpoints) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *NoEndpoints) GetExists() bool {
if m != nil {
return m.Exists
}
return false
}
func init() {
proto.RegisterType((*Update)(nil), "conduit.proxy.destination.Update")
proto.RegisterType((*AddrSet)(nil), "conduit.proxy.destination.AddrSet")
proto.RegisterType((*WeightedAddrSet)(nil), "conduit.proxy.destination.WeightedAddrSet")
proto.RegisterType((*WeightedAddr)(nil), "conduit.proxy.destination.WeightedAddr")
proto.RegisterType((*NoEndpoints)(nil), "conduit.proxy.destination.NoEndpoints")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for Destination service
type DestinationClient interface {
// Given a destination, return all addresses in that destination as a long-
// running stream of updates.
Get(ctx context.Context, in *conduit_common.Destination, opts ...grpc.CallOption) (Destination_GetClient, error)
}
type destinationClient struct {
cc *grpc.ClientConn
}
func NewDestinationClient(cc *grpc.ClientConn) DestinationClient {
return &destinationClient{cc}
}
func (c *destinationClient) Get(ctx context.Context, in *conduit_common.Destination, opts ...grpc.CallOption) (Destination_GetClient, error) {
stream, err := grpc.NewClientStream(ctx, &_Destination_serviceDesc.Streams[0], c.cc, "/conduit.proxy.destination.Destination/Get", opts...)
if err != nil {
return nil, err
}
x := &destinationGetClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type Destination_GetClient interface {
Recv() (*Update, error)
grpc.ClientStream
}
type destinationGetClient struct {
grpc.ClientStream
}
func (x *destinationGetClient) Recv() (*Update, error) {
m := new(Update)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// Server API for Destination service
type DestinationServer interface {
// Given a destination, return all addresses in that destination as a long-
// running stream of updates.
Get(*conduit_common.Destination, Destination_GetServer) error
}
func RegisterDestinationServer(s *grpc.Server, srv DestinationServer) {
s.RegisterService(&_Destination_serviceDesc, srv)
}
func _Destination_Get_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(conduit_common.Destination)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(DestinationServer).Get(m, &destinationGetServer{stream})
}
type Destination_GetServer interface {
Send(*Update) error
grpc.ServerStream
}
type destinationGetServer struct {
grpc.ServerStream
}
func (x *destinationGetServer) Send(m *Update) error {
return x.ServerStream.SendMsg(m)
}
var _Destination_serviceDesc = grpc.ServiceDesc{
ServiceName: "conduit.proxy.destination.Destination",
HandlerType: (*DestinationServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "Get",
Handler: _Destination_Get_Handler,
ServerStreams: true,
},
},
Metadata: "proxy/destination/destination.proto",
}
func init() { proto.RegisterFile("proxy/destination/destination.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 422 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x93, 0x4f, 0x6f, 0xd3, 0x30,
0x18, 0xc6, 0xeb, 0xa6, 0x0d, 0xed, 0x9b, 0x56, 0x80, 0x41, 0x28, 0x84, 0x4b, 0x09, 0x02, 0x2a,
0x0e, 0x69, 0x55, 0x2e, 0xfc, 0x29, 0x20, 0x10, 0x15, 0x45, 0xfc, 0x39, 0x78, 0x9b, 0xb6, 0xd3,
0xaa, 0x34, 0xb6, 0xb6, 0x68, 0x8d, 0x1d, 0xc5, 0x6e, 0xd7, 0x7e, 0xd8, 0x7d, 0x8b, 0x49, 0xbb,
0x4e, 0x71, 0xb2, 0x35, 0xeb, 0xb4, 0xa8, 0x97, 0x9d, 0xe2, 0x37, 0x7a, 0x9e, 0x9f, 0xfd, 0xbc,
0xaf, 0x0d, 0xaf, 0xe2, 0x44, 0x2c, 0x57, 0x3d, 0xca, 0xa4, 0x0a, 0xb9, 0xaf, 0x42, 0xc1, 0x8b,
0x6b, 0x2f, 0x4e, 0x84, 0x12, 0xf8, 0x79, 0x20, 0x38, 0x9d, 0x87, 0xca, 0xd3, 0x62, 0xaf, 0x20,
0x70, 0x9e, 0x04, 0x22, 0x8a, 0x04, 0xef, 0x65, 0x9f, 0x4c, 0xef, 0x9e, 0x21, 0x30, 0xf7, 0x62,
0xea, 0x2b, 0x86, 0xbf, 0x82, 0xe1, 0x53, 0x6a, 0xa3, 0x0e, 0xea, 0x5a, 0x83, 0x77, 0xde, 0x9d,
0x20, 0x6f, 0x9f, 0x85, 0x47, 0xc7, 0x8a, 0xd1, 0xef, 0x94, 0x26, 0x3b, 0x4c, 0x8d, 0x2b, 0x24,
0x35, 0xe2, 0x21, 0x98, 0x09, 0x8b, 0xc4, 0x82, 0xd9, 0x55, 0x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