Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointManager ¶
type EndpointManager interface {
ListEndpoints(ctx context.Context, serviceId string) ([]*model.Endpoint, error)
RegisterEndpoints(ctx context.Context, service *model.Service, serviceId string) error
DeregisterEndpoints(ctx context.Context, service *model.Service, serviceId string) error
}
func NewEndpointManager ¶
func NewEndpointManager(cfg *aws.Config) EndpointManager
type ServiceDiscoveryClient ¶
type ServiceDiscoveryClient interface {
// ListServices returns all services and their endpoints for a given namespace
ListServices(ctx context.Context, namespaceName string) ([]*model.Service, error)
// CreateService creates a Cloud Map service resource and return created service struct
CreateService(ctx context.Context, service *model.Service) error
// GetService returns a service resource fetched from the Cloud Map API or nil if not found
GetService(ctx context.Context, namespace string, name string) (*model.Service, error)
// RegisterEndpoints registers all endpoints for given service
RegisterEndpoints(ctx context.Context, service *model.Service) error
// DeleteEndpoints de-registers all endpoints for given service
DeleteEndpoints(ctx context.Context, service *model.Service) error
}
func NewServiceDiscoveryClient ¶
func NewServiceDiscoveryClient(cfg *aws.Config) ServiceDiscoveryClient
Click to show internal directories.
Click to hide internal directories.