Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Discovery ¶
type Discovery interface { // GetService return the service instances according to the service name. GetService(ctx context.Context, opts ...ServiceOption) ([]*ServiceInstance, error) }
Discovery is service discovery.
type Registrar ¶
type Registrar interface { // Register the registration. Register(ctx context.Context, service *ServiceInstance) error // Deregister the registration. Deregister(ctx context.Context, service *ServiceInstance) error //HealthCheck the registration. HealthCheck(service *ServiceInstance) }
Registrar is service registrar.
type ServiceInstance ¶
func NewServiceInstance ¶
type ServiceOption ¶
type ServiceOption func(*ServiceInstance)
func WithNamespace ¶
func WithNamespace(namespace string) ServiceOption
func WithPrivateIP ¶
func WithPrivateIP(privateIP string) ServiceOption
func WithPrivatePort ¶
func WithPrivatePort(privatePort uint16) ServiceOption
Click to show internal directories.
Click to hide internal directories.