Documentation ¶
Index ¶
- type AWSSDClient
- type AWSSDProvider
- func (p *AWSSDProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error
- func (p *AWSSDProvider) CreateService(namespaceID *string, srvName *string, ep *endpoint.Endpoint) (*sd.Service, error)
- func (p *AWSSDProvider) DeleteService(service *sd.Service) error
- func (p *AWSSDProvider) DeregisterInstance(service *sd.Service, ep *endpoint.Endpoint) error
- func (p *AWSSDProvider) ListInstancesByServiceID(serviceID *string) ([]*sd.InstanceSummary, error)
- func (p *AWSSDProvider) ListNamespaces() ([]*sd.NamespaceSummary, error)
- func (p *AWSSDProvider) ListServicesByNamespaceID(namespaceID *string) (map[string]*sd.Service, error)
- func (p *AWSSDProvider) Records(ctx context.Context) (endpoints []*endpoint.Endpoint, err error)
- func (p *AWSSDProvider) RegisterInstance(service *sd.Service, ep *endpoint.Endpoint) error
- func (p *AWSSDProvider) UpdateService(service *sd.Service, ep *endpoint.Endpoint) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSSDClient ¶
type AWSSDClient interface { CreateService(input *sd.CreateServiceInput) (*sd.CreateServiceOutput, error) DeregisterInstance(input *sd.DeregisterInstanceInput) (*sd.DeregisterInstanceOutput, error) ListInstancesPages(input *sd.ListInstancesInput, fn func(*sd.ListInstancesOutput, bool) bool) error ListNamespacesPages(input *sd.ListNamespacesInput, fn func(*sd.ListNamespacesOutput, bool) bool) error ListServicesPages(input *sd.ListServicesInput, fn func(*sd.ListServicesOutput, bool) bool) error RegisterInstance(input *sd.RegisterInstanceInput) (*sd.RegisterInstanceOutput, error) UpdateService(input *sd.UpdateServiceInput) (*sd.UpdateServiceOutput, error) DeleteService(input *sd.DeleteServiceInput) (*sd.DeleteServiceOutput, error) }
AWSSDClient is the subset of the AWS Cloud Map API that we actually use. Add methods as required. Signatures must match exactly. Taken from https://github.com/aws/aws-sdk-go/blob/HEAD/service/servicediscovery/api.go
type AWSSDProvider ¶
type AWSSDProvider struct { provider.BaseProvider // contains filtered or unexported fields }
AWSSDProvider is an implementation of Provider for AWS Cloud Map.
func NewAWSSDProvider ¶
func NewAWSSDProvider(domainFilter endpoint.DomainFilter, namespaceType string, assumeRole string, assumeRoleExternalID string, dryRun, cleanEmptyService bool, ownerID string) (*AWSSDProvider, error)
NewAWSSDProvider initializes a new AWS Cloud Map based Provider.
func (*AWSSDProvider) ApplyChanges ¶
ApplyChanges applies Kubernetes changes in endpoints to AWS API
func (*AWSSDProvider) CreateService ¶
func (p *AWSSDProvider) CreateService(namespaceID *string, srvName *string, ep *endpoint.Endpoint) (*sd.Service, error)
CreateService creates a new service in AWS API. Returns the created service.
func (*AWSSDProvider) DeleteService ¶ added in v0.11.1
func (p *AWSSDProvider) DeleteService(service *sd.Service) error
DeleteService deletes empty Service from AWS API if its owner id match
func (*AWSSDProvider) DeregisterInstance ¶
DeregisterInstance removes an instance from given service.
func (*AWSSDProvider) ListInstancesByServiceID ¶
func (p *AWSSDProvider) ListInstancesByServiceID(serviceID *string) ([]*sd.InstanceSummary, error)
ListInstancesByServiceID returns list of instances registered in given service.
func (*AWSSDProvider) ListNamespaces ¶
func (p *AWSSDProvider) ListNamespaces() ([]*sd.NamespaceSummary, error)
ListNamespaces returns all namespaces matching defined namespace filter
func (*AWSSDProvider) ListServicesByNamespaceID ¶
func (p *AWSSDProvider) ListServicesByNamespaceID(namespaceID *string) (map[string]*sd.Service, error)
ListServicesByNamespaceID returns list of services in given namespace. Returns map[srv_name]*sd.Service
func (*AWSSDProvider) RegisterInstance ¶
RegisterInstance creates a new instance in given service.
func (*AWSSDProvider) UpdateService ¶
UpdateService updates the specified service with information from provided endpoint.