mirror of https://github.com/linkerd/linkerd2.git
349 lines
11 KiB
Go
349 lines
11 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
|
|
*/
|
|
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 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"`
|
|
}
|
|
|
|
func (*Update_Add) isUpdate_Update() {}
|
|
func (*Update_Remove) 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
|
|
}
|
|
|
|
// 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),
|
|
}
|
|
}
|
|
|
|
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 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
|
|
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 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"`
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
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"`
|
|
}
|
|
|
|
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 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")
|
|
}
|
|
|
|
// 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{
|
|
// 281 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x4b, 0x4b, 0xc4, 0x30,
|
|
0x14, 0x85, 0x27, 0x56, 0xa3, 0xdc, 0x2a, 0x42, 0x04, 0xa9, 0x75, 0x53, 0xe3, 0xc2, 0xe2, 0x22,
|
|
0x33, 0xd4, 0xa5, 0x0f, 0x50, 0x04, 0x75, 0x27, 0xf5, 0xb9, 0xad, 0xbd, 0x41, 0xbb, 0x68, 0x53,
|
|
0xd2, 0x8c, 0x8f, 0x7f, 0xe1, 0x4f, 0x96, 0xa6, 0xd1, 0xa9, 0x03, 0x16, 0x57, 0x79, 0xdc, 0x73,
|
|
0xbe, 0x9c, 0x9b, 0x0b, 0xbb, 0xb5, 0x56, 0xef, 0x1f, 0x63, 0x94, 0x8d, 0x29, 0xaa, 0xcc, 0x14,
|
|
0xaa, 0xea, 0xef, 0x45, 0xad, 0x95, 0x51, 0x6c, 0x2b, 0x57, 0x15, 0x4e, 0x0b, 0x23, 0xac, 0x58,
|
|
0xf4, 0x04, 0xe1, 0x46, 0xae, 0xca, 0x52, 0x55, 0xe3, 0x6e, 0xe9, 0xf4, 0xfc, 0x93, 0x00, 0xbd,
|
|
0xab, 0x31, 0x33, 0x92, 0x9d, 0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