// Code generated by protoc-gen-go. DO NOT EDIT. // source: proxy/destination.proto /* Package destination is a generated protocol buffer package. It is generated from these files: proxy/destination.proto It has these top-level messages: Update AddrSet WeightedAddrSet WeightedAddr TlsIdentity NoEndpoints */ package 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"` TlsIdentity *TlsIdentity `protobuf:"bytes,5,opt,name=tls_identity,json=tlsIdentity" json:"tls_identity,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 (m *WeightedAddr) GetMetricLabels() map[string]string { if m != nil { return m.MetricLabels } return nil } func (m *WeightedAddr) GetTlsIdentity() *TlsIdentity { if m != nil { return m.TlsIdentity } return nil } // Which strategy should be used for verifying TLS. type TlsIdentity struct { // Types that are valid to be assigned to Strategy: // *TlsIdentity_K8SPodIdentity_ Strategy isTlsIdentity_Strategy `protobuf_oneof:"strategy"` } func (m *TlsIdentity) Reset() { *m = TlsIdentity{} } func (m *TlsIdentity) String() string { return proto.CompactTextString(m) } func (*TlsIdentity) ProtoMessage() {} func (*TlsIdentity) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } type isTlsIdentity_Strategy interface{ isTlsIdentity_Strategy() } type TlsIdentity_K8SPodIdentity_ struct { K8SPodIdentity *TlsIdentity_K8SPodIdentity `protobuf:"bytes,2,opt,name=k8s_pod_identity,json=k8sPodIdentity,oneof"` } func (*TlsIdentity_K8SPodIdentity_) isTlsIdentity_Strategy() {} func (m *TlsIdentity) GetStrategy() isTlsIdentity_Strategy { if m != nil { return m.Strategy } return nil } func (m *TlsIdentity) GetK8SPodIdentity() *TlsIdentity_K8SPodIdentity { if x, ok := m.GetStrategy().(*TlsIdentity_K8SPodIdentity_); ok { return x.K8SPodIdentity } return nil } // XXX_OneofFuncs is for the internal use of the proto package. func (*TlsIdentity) 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 _TlsIdentity_OneofMarshaler, _TlsIdentity_OneofUnmarshaler, _TlsIdentity_OneofSizer, []interface{}{ (*TlsIdentity_K8SPodIdentity_)(nil), } } func _TlsIdentity_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { m := msg.(*TlsIdentity) // strategy switch x := m.Strategy.(type) { case *TlsIdentity_K8SPodIdentity_: b.EncodeVarint(2<<3 | proto.WireBytes) if err := b.EncodeMessage(x.K8SPodIdentity); err != nil { return err } case nil: default: return fmt.Errorf("TlsIdentity.Strategy has unexpected type %T", x) } return nil } func _TlsIdentity_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { m := msg.(*TlsIdentity) switch tag { case 2: // strategy.k8s_pod_identity if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } msg := new(TlsIdentity_K8SPodIdentity) err := b.DecodeMessage(msg) m.Strategy = &TlsIdentity_K8SPodIdentity_{msg} return true, err default: return false, nil } } func _TlsIdentity_OneofSizer(msg proto.Message) (n int) { m := msg.(*TlsIdentity) // strategy switch x := m.Strategy.(type) { case *TlsIdentity_K8SPodIdentity_: s := proto.Size(x.K8SPodIdentity) 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 } // Verify the certificate based on the Kubernetes pod identity. type TlsIdentity_K8SPodIdentity struct { // The pod_identity string is of the format: // {owner_name}.{owner_type}.{pod_ns}.conduit-managed.{controller_ns}.svc.cluster.local PodIdentity string `protobuf:"bytes,1,opt,name=pod_identity,json=podIdentity" json:"pod_identity,omitempty"` // The Kubernetes namespace of the pod's Conduit control plane. ControllerNs string `protobuf:"bytes,2,opt,name=controller_ns,json=controllerNs" json:"controller_ns,omitempty"` } func (m *TlsIdentity_K8SPodIdentity) Reset() { *m = TlsIdentity_K8SPodIdentity{} } func (m *TlsIdentity_K8SPodIdentity) String() string { return proto.CompactTextString(m) } func (*TlsIdentity_K8SPodIdentity) ProtoMessage() {} func (*TlsIdentity_K8SPodIdentity) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4, 0} } func (m *TlsIdentity_K8SPodIdentity) GetPodIdentity() string { if m != nil { return m.PodIdentity } return "" } func (m *TlsIdentity_K8SPodIdentity) GetControllerNs() string { if m != nil { return m.ControllerNs } return "" } 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{5} } 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((*TlsIdentity)(nil), "conduit.proxy.destination.TlsIdentity") proto.RegisterType((*TlsIdentity_K8SPodIdentity)(nil), "conduit.proxy.destination.TlsIdentity.K8sPodIdentity") 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.proto", } func init() { proto.RegisterFile("proxy/destination.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ // 553 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xd1, 0x6e, 0xd3, 0x3c, 0x18, 0x6d, 0xda, 0xb5, 0x7f, 0xf7, 0x25, 0xdd, 0x3f, 0x2c, 0x04, 0xa1, 0xdc, 0x6c, 0x41, 0xc0, 0xc4, 0x45, 0x3a, 0x15, 0x21, 0x15, 0x18, 0x03, 0x2a, 0x26, 0x5a, 0x0d, 0x26, 0x14, 0x86, 0x98,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