Documentation ¶
Index ¶
- Variables
- func RegisterRegistryServer(s *grpc.Server, srv RegistryServer)
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)
- func (*Empty) ProtoMessage()
- func (m *Empty) Reset()
- func (m *Empty) String() string
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Empty) XXX_Merge(src proto.Message)
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- type EventType
- type RegistryClient
- type RegistryServer
- type Registry_GetServicesClient
- type Registry_GetServicesServer
- type ServiceWorkload
- func (*ServiceWorkload) Descriptor() ([]byte, []int)
- func (m *ServiceWorkload) GetConnectivityDomain() string
- func (m *ServiceWorkload) GetPorts() []int32
- func (m *ServiceWorkload) GetServiceName() string
- func (m *ServiceWorkload) GetWorkloads() []*Workload
- func (*ServiceWorkload) ProtoMessage()
- func (m *ServiceWorkload) Reset()
- func (m *ServiceWorkload) String() string
- func (x *ServiceWorkload) Validate() error
- func (m *ServiceWorkload) XXX_DiscardUnknown()
- func (m *ServiceWorkload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ServiceWorkload) XXX_Merge(src proto.Message)
- func (m *ServiceWorkload) XXX_Size() int
- func (m *ServiceWorkload) XXX_Unmarshal(b []byte) error
- type UnimplementedRegistryServer
- func (*UnimplementedRegistryServer) GetServices(req *Empty, srv Registry_GetServicesServer) error
- func (*UnimplementedRegistryServer) RegisterWorkload(ctx context.Context, req *ServiceWorkload) (*Empty, error)
- func (*UnimplementedRegistryServer) RemoveWorkload(ctx context.Context, req *ServiceWorkload) (*Empty, error)
- type Workload
- func (*Workload) Descriptor() ([]byte, []int)
- func (m *Workload) GetIPAddress() []string
- func (m *Workload) GetIdentifier() *WorkloadIdentifier
- func (*Workload) ProtoMessage()
- func (m *Workload) Reset()
- func (m *Workload) String() string
- func (m *Workload) Validate() error
- func (m *Workload) XXX_DiscardUnknown()
- func (m *Workload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Workload) XXX_Merge(src proto.Message)
- func (m *Workload) XXX_Size() int
- func (m *Workload) XXX_Unmarshal(b []byte) error
- type WorkloadEvent
- func (*WorkloadEvent) Descriptor() ([]byte, []int)
- func (m *WorkloadEvent) GetEventType() EventType
- func (m *WorkloadEvent) GetServiceWorkload() *ServiceWorkload
- func (*WorkloadEvent) ProtoMessage()
- func (m *WorkloadEvent) Reset()
- func (m *WorkloadEvent) String() string
- func (m *WorkloadEvent) XXX_DiscardUnknown()
- func (m *WorkloadEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WorkloadEvent) XXX_Merge(src proto.Message)
- func (m *WorkloadEvent) XXX_Size() int
- func (m *WorkloadEvent) XXX_Unmarshal(b []byte) error
- type WorkloadIdentifier
- func (*WorkloadIdentifier) Descriptor() ([]byte, []int)
- func (m *WorkloadIdentifier) GetCluster() string
- func (m *WorkloadIdentifier) GetName() string
- func (m *WorkloadIdentifier) GetPodName() string
- func (*WorkloadIdentifier) ProtoMessage()
- func (m *WorkloadIdentifier) Reset()
- func (m *WorkloadIdentifier) String() string
- func (x *WorkloadIdentifier) Validate() error
- func (m *WorkloadIdentifier) XXX_DiscardUnknown()
- func (m *WorkloadIdentifier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WorkloadIdentifier) XXX_Merge(src proto.Message)
- func (m *WorkloadIdentifier) XXX_Size() int
- func (m *WorkloadIdentifier) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var EventType_name = map[int32]string{
0: "Register",
1: "Remove",
}
View Source
var EventType_value = map[string]int32{
"Register": 0,
"Remove": 1,
}
Functions ¶
func RegisterRegistryServer ¶
func RegisterRegistryServer(s *grpc.Server, srv RegistryServer)
Types ¶
type Empty ¶
type Empty struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶
func (*Empty) XXX_Unmarshal ¶
type RegistryClient ¶
type RegistryClient interface { RegisterWorkload(ctx context.Context, in *ServiceWorkload, opts ...grpc.CallOption) (*Empty, error) GetServices(ctx context.Context, in *Empty, opts ...grpc.CallOption) (Registry_GetServicesClient, error) RemoveWorkload(ctx context.Context, in *ServiceWorkload, opts ...grpc.CallOption) (*Empty, error) }
RegistryClient is the client API for Registry service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRegistryClient ¶
func NewRegistryClient(cc *grpc.ClientConn) RegistryClient
type RegistryServer ¶
type RegistryServer interface { RegisterWorkload(context.Context, *ServiceWorkload) (*Empty, error) GetServices(*Empty, Registry_GetServicesServer) error RemoveWorkload(context.Context, *ServiceWorkload) (*Empty, error) }
RegistryServer is the server API for Registry service.
type Registry_GetServicesClient ¶
type Registry_GetServicesClient interface { Recv() (*WorkloadEvent, error) grpc.ClientStream }
type Registry_GetServicesServer ¶
type Registry_GetServicesServer interface { Send(*WorkloadEvent) error grpc.ServerStream }
type ServiceWorkload ¶
type ServiceWorkload struct { ServiceName string `protobuf:"bytes,1,opt,name=serviceName,proto3" json:"serviceName,omitempty"` ConnectivityDomain string `protobuf:"bytes,2,opt,name=connectivityDomain,proto3" json:"connectivityDomain,omitempty"` Workloads []*Workload `protobuf:"bytes,3,rep,name=workloads,proto3" json:"workloads,omitempty"` Ports []int32 `protobuf:"varint,4,rep,packed,name=ports,proto3" json:"ports,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request used to register a new service or update the existing ones
func (*ServiceWorkload) Descriptor ¶
func (*ServiceWorkload) Descriptor() ([]byte, []int)
func (*ServiceWorkload) GetConnectivityDomain ¶
func (m *ServiceWorkload) GetConnectivityDomain() string
func (*ServiceWorkload) GetPorts ¶
func (m *ServiceWorkload) GetPorts() []int32
func (*ServiceWorkload) GetServiceName ¶
func (m *ServiceWorkload) GetServiceName() string
func (*ServiceWorkload) GetWorkloads ¶
func (m *ServiceWorkload) GetWorkloads() []*Workload
func (*ServiceWorkload) ProtoMessage ¶
func (*ServiceWorkload) ProtoMessage()
func (*ServiceWorkload) Reset ¶
func (m *ServiceWorkload) Reset()
func (*ServiceWorkload) String ¶
func (m *ServiceWorkload) String() string
func (*ServiceWorkload) Validate ¶
func (x *ServiceWorkload) Validate() error
func (*ServiceWorkload) XXX_DiscardUnknown ¶
func (m *ServiceWorkload) XXX_DiscardUnknown()
func (*ServiceWorkload) XXX_Marshal ¶
func (m *ServiceWorkload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ServiceWorkload) XXX_Merge ¶
func (m *ServiceWorkload) XXX_Merge(src proto.Message)
func (*ServiceWorkload) XXX_Size ¶
func (m *ServiceWorkload) XXX_Size() int
func (*ServiceWorkload) XXX_Unmarshal ¶
func (m *ServiceWorkload) XXX_Unmarshal(b []byte) error
type UnimplementedRegistryServer ¶
type UnimplementedRegistryServer struct { }
UnimplementedRegistryServer can be embedded to have forward compatible implementations.
func (*UnimplementedRegistryServer) GetServices ¶
func (*UnimplementedRegistryServer) GetServices(req *Empty, srv Registry_GetServicesServer) error
func (*UnimplementedRegistryServer) RegisterWorkload ¶
func (*UnimplementedRegistryServer) RegisterWorkload(ctx context.Context, req *ServiceWorkload) (*Empty, error)
func (*UnimplementedRegistryServer) RemoveWorkload ¶
func (*UnimplementedRegistryServer) RemoveWorkload(ctx context.Context, req *ServiceWorkload) (*Empty, error)
type Workload ¶
type Workload struct { Identifier *WorkloadIdentifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` IPAddress []string `protobuf:"bytes,2,rep,name=IPAddress,json=iPAddress,proto3" json:"IPAddress,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Basic workload
func (*Workload) Descriptor ¶
func (*Workload) GetIPAddress ¶
func (*Workload) GetIdentifier ¶
func (m *Workload) GetIdentifier() *WorkloadIdentifier
func (*Workload) ProtoMessage ¶
func (*Workload) ProtoMessage()
func (*Workload) XXX_DiscardUnknown ¶
func (m *Workload) XXX_DiscardUnknown()
func (*Workload) XXX_Marshal ¶
func (*Workload) XXX_Unmarshal ¶
type WorkloadEvent ¶
type WorkloadEvent struct { EventType EventType `protobuf:"varint,1,opt,name=eventType,proto3,enum=svreg.EventType" json:"eventType,omitempty"` ServiceWorkload *ServiceWorkload `protobuf:"bytes,2,opt,name=serviceWorkload,proto3" json:"serviceWorkload,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*WorkloadEvent) Descriptor ¶
func (*WorkloadEvent) Descriptor() ([]byte, []int)
func (*WorkloadEvent) GetEventType ¶
func (m *WorkloadEvent) GetEventType() EventType
func (*WorkloadEvent) GetServiceWorkload ¶
func (m *WorkloadEvent) GetServiceWorkload() *ServiceWorkload
func (*WorkloadEvent) ProtoMessage ¶
func (*WorkloadEvent) ProtoMessage()
func (*WorkloadEvent) Reset ¶
func (m *WorkloadEvent) Reset()
func (*WorkloadEvent) String ¶
func (m *WorkloadEvent) String() string
func (*WorkloadEvent) XXX_DiscardUnknown ¶
func (m *WorkloadEvent) XXX_DiscardUnknown()
func (*WorkloadEvent) XXX_Marshal ¶
func (m *WorkloadEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WorkloadEvent) XXX_Merge ¶
func (m *WorkloadEvent) XXX_Merge(src proto.Message)
func (*WorkloadEvent) XXX_Size ¶
func (m *WorkloadEvent) XXX_Size() int
func (*WorkloadEvent) XXX_Unmarshal ¶
func (m *WorkloadEvent) XXX_Unmarshal(b []byte) error
type WorkloadIdentifier ¶
type WorkloadIdentifier struct { Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` PodName string `protobuf:"bytes,2,opt,name=podName,proto3" json:"podName,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*WorkloadIdentifier) Descriptor ¶
func (*WorkloadIdentifier) Descriptor() ([]byte, []int)
func (*WorkloadIdentifier) GetCluster ¶
func (m *WorkloadIdentifier) GetCluster() string
func (*WorkloadIdentifier) GetName ¶
func (m *WorkloadIdentifier) GetName() string
func (*WorkloadIdentifier) GetPodName ¶
func (m *WorkloadIdentifier) GetPodName() string
func (*WorkloadIdentifier) ProtoMessage ¶
func (*WorkloadIdentifier) ProtoMessage()
func (*WorkloadIdentifier) Reset ¶
func (m *WorkloadIdentifier) Reset()
func (*WorkloadIdentifier) String ¶
func (m *WorkloadIdentifier) String() string
func (*WorkloadIdentifier) Validate ¶
func (x *WorkloadIdentifier) Validate() error
func (*WorkloadIdentifier) XXX_DiscardUnknown ¶
func (m *WorkloadIdentifier) XXX_DiscardUnknown()
func (*WorkloadIdentifier) XXX_Marshal ¶
func (m *WorkloadIdentifier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WorkloadIdentifier) XXX_Merge ¶
func (m *WorkloadIdentifier) XXX_Merge(src proto.Message)
func (*WorkloadIdentifier) XXX_Size ¶
func (m *WorkloadIdentifier) XXX_Size() int
func (*WorkloadIdentifier) XXX_Unmarshal ¶
func (m *WorkloadIdentifier) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.