cloudmap

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL