Documentation
¶
Index ¶
- Variables
- func RegisterServiceRegistryServer(s *grpc.Server, srv ServiceRegistryServer)
- type NamedPort
- type RegistrationResult
- func (*RegistrationResult) Descriptor() ([]byte, []int)deprecated
- func (x *RegistrationResult) GetIpaddress() string
- func (x *RegistrationResult) GetNamespace() string
- func (x *RegistrationResult) GetPorts() []*NamedPort
- func (x *RegistrationResult) GetServiceName() string
- func (x *RegistrationResult) GetStatus() uint32
- func (x *RegistrationResult) GetStatusDetails() string
- func (*RegistrationResult) ProtoMessage()
- func (x *RegistrationResult) ProtoReflect() protoreflect.Message
- func (x *RegistrationResult) Reset()
- func (x *RegistrationResult) String() string
- type ServiceInfo
- func (*ServiceInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ServiceInfo) GetHostName() string
- func (x *ServiceInfo) GetIpaddress() string
- func (x *ServiceInfo) GetNamespace() string
- func (x *ServiceInfo) GetNodeName() string
- func (x *ServiceInfo) GetPorts() []*NamedPort
- func (x *ServiceInfo) GetServiceName() string
- func (x *ServiceInfo) GetWeight() float32
- func (*ServiceInfo) ProtoMessage()
- func (x *ServiceInfo) ProtoReflect() protoreflect.Message
- func (x *ServiceInfo) Reset()
- func (x *ServiceInfo) String() string
- type ServiceRegistryClient
- type ServiceRegistryServer
- type UnimplementedServiceRegistryServer
Constants ¶
This section is empty.
Variables ¶
var File_registry_proto protoreflect.FileDescriptor
Functions ¶
func RegisterServiceRegistryServer ¶
func RegisterServiceRegistryServer(s *grpc.Server, srv ServiceRegistryServer)
Types ¶
type NamedPort ¶
type NamedPort struct { // The actual numerical listening port Port int32 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"` // The name of the port, e.g. "https" Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*NamedPort) Descriptor
deprecated
func (*NamedPort) ProtoMessage ¶
func (*NamedPort) ProtoMessage()
func (*NamedPort) ProtoReflect ¶
func (x *NamedPort) ProtoReflect() protoreflect.Message
type RegistrationResult ¶
type RegistrationResult struct { // namespace the service is registered in Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // name of the service ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` // IP address of that specific host name Ipaddress string `protobuf:"bytes,3,opt,name=ipaddress,proto3" json:"ipaddress,omitempty"` // Array of named ports for the service Ports []*NamedPort `protobuf:"bytes,4,rep,name=ports,proto3" json:"ports,omitempty"` // Status code of the operation // We will reuse the HTTP status code, e.g. a 201 will signal that the entry // has been successfully created. Status uint32 `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"` // Details message explaining the status StatusDetails string `protobuf:"bytes,6,opt,name=status_details,json=statusDetails,proto3" json:"status_details,omitempty"` // contains filtered or unexported fields }
The response message containing the result of the registration In case of a successful registration, the input will be in the response. If the registration failed, all values except for the status code and a reason will be empty.
func (*RegistrationResult) Descriptor
deprecated
func (*RegistrationResult) Descriptor() ([]byte, []int)
Deprecated: Use RegistrationResult.ProtoReflect.Descriptor instead.
func (*RegistrationResult) GetIpaddress ¶
func (x *RegistrationResult) GetIpaddress() string
func (*RegistrationResult) GetNamespace ¶
func (x *RegistrationResult) GetNamespace() string
func (*RegistrationResult) GetPorts ¶
func (x *RegistrationResult) GetPorts() []*NamedPort
func (*RegistrationResult) GetServiceName ¶
func (x *RegistrationResult) GetServiceName() string
func (*RegistrationResult) GetStatus ¶
func (x *RegistrationResult) GetStatus() uint32
func (*RegistrationResult) GetStatusDetails ¶
func (x *RegistrationResult) GetStatusDetails() string
func (*RegistrationResult) ProtoMessage ¶
func (*RegistrationResult) ProtoMessage()
func (*RegistrationResult) ProtoReflect ¶
func (x *RegistrationResult) ProtoReflect() protoreflect.Message
func (*RegistrationResult) Reset ¶
func (x *RegistrationResult) Reset()
func (*RegistrationResult) String ¶
func (x *RegistrationResult) String() string
type ServiceInfo ¶
type ServiceInfo struct { // namespace the service is registered in Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // name of the service - this determines which namespace this service uses ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` // DNS name of the service host not including subdomain or domain and no dots HostName string `protobuf:"bytes,3,opt,name=host_name,json=hostName,proto3" json:"host_name,omitempty"` // IP address of that specific host name Ipaddress string `protobuf:"bytes,4,opt,name=ipaddress,proto3" json:"ipaddress,omitempty"` // Physical node name where the service instance is running. // For bare metal or VM services, this may the the FQN of the service including the host_name NodeName string `protobuf:"bytes,5,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` // Array of named ports for the service Ports []*NamedPort `protobuf:"bytes,6,rep,name=ports,proto3" json:"ports,omitempty"` // A weight this service instance should be given // NOTE: this information may not be utilized by the consumer of this information Weight float32 `protobuf:"fixed32,7,opt,name=weight,proto3" json:"weight,omitempty"` // contains filtered or unexported fields }
The request message with the service info.
func (*ServiceInfo) Descriptor
deprecated
func (*ServiceInfo) Descriptor() ([]byte, []int)
Deprecated: Use ServiceInfo.ProtoReflect.Descriptor instead.
func (*ServiceInfo) GetHostName ¶
func (x *ServiceInfo) GetHostName() string
func (*ServiceInfo) GetIpaddress ¶
func (x *ServiceInfo) GetIpaddress() string
func (*ServiceInfo) GetNamespace ¶
func (x *ServiceInfo) GetNamespace() string
func (*ServiceInfo) GetNodeName ¶
func (x *ServiceInfo) GetNodeName() string
func (*ServiceInfo) GetPorts ¶
func (x *ServiceInfo) GetPorts() []*NamedPort
func (*ServiceInfo) GetServiceName ¶
func (x *ServiceInfo) GetServiceName() string
func (*ServiceInfo) GetWeight ¶
func (x *ServiceInfo) GetWeight() float32
func (*ServiceInfo) ProtoMessage ¶
func (*ServiceInfo) ProtoMessage()
func (*ServiceInfo) ProtoReflect ¶
func (x *ServiceInfo) ProtoReflect() protoreflect.Message
func (*ServiceInfo) Reset ¶
func (x *ServiceInfo) Reset()
func (*ServiceInfo) String ¶
func (x *ServiceInfo) String() string
type ServiceRegistryClient ¶
type ServiceRegistryClient interface { // Registers a service Register(ctx context.Context, in *ServiceInfo, opts ...grpc.CallOption) (*RegistrationResult, error) // unregisters a service UnRegister(ctx context.Context, in *ServiceInfo, opts ...grpc.CallOption) (*RegistrationResult, error) }
ServiceRegistryClient is the client API for ServiceRegistry service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewServiceRegistryClient ¶
func NewServiceRegistryClient(cc grpc.ClientConnInterface) ServiceRegistryClient
type ServiceRegistryServer ¶
type ServiceRegistryServer interface { // Registers a service Register(context.Context, *ServiceInfo) (*RegistrationResult, error) // unregisters a service UnRegister(context.Context, *ServiceInfo) (*RegistrationResult, error) }
ServiceRegistryServer is the server API for ServiceRegistry service.
type UnimplementedServiceRegistryServer ¶
type UnimplementedServiceRegistryServer struct { }
UnimplementedServiceRegistryServer can be embedded to have forward compatible implementations.
func (*UnimplementedServiceRegistryServer) Register ¶
func (*UnimplementedServiceRegistryServer) Register(context.Context, *ServiceInfo) (*RegistrationResult, error)
func (*UnimplementedServiceRegistryServer) UnRegister ¶
func (*UnimplementedServiceRegistryServer) UnRegister(context.Context, *ServiceInfo) (*RegistrationResult, error)