Documentation
¶
Index ¶
- Constants
- func NewECSClient(credentialsProvider *credentials.Credentials, ...) (ecs.ECSClient, error)
- type ECSClientFactory
- type ECSClientOption
- func WithDiscoverPollEndpointCache(c async.TTLCache) ECSClientOption
- func WithDiscoverPollEndpointCacheTTL(t *async.TTL) ECSClientOption
- func WithFIPSDetected(val bool) ECSClientOption
- func WithIPv6PortBindingExcluded(val bool) ECSClientOption
- func WithMetricsFactory(metricsFactory metrics.EntryFactory) ECSClientOption
- func WithSASCCustomRetryBackoff(f func(func() error) error) ECSClientOption
- func WithSTSCAttachmentCustomRetryBackoff(f func(func() error) error) ECSClientOption
- func WithStandardClient(s ecs.ECSStandardSDK) ECSClientOption
- func WithSubmitStateChangeClient(s ecs.ECSSubmitStateSDK) ECSClientOption
Constants ¶
const ( // RoundtripTimeout should only time out after dial and TLS handshake timeouts have elapsed. // Add additional 2 seconds to the sum of these 2 timeouts to be extra sure of this. RoundtripTimeout = httpclient.DefaultDialTimeout + httpclient.DefaultTLSHandshakeTimeout + 2*time.Second )
Variables ¶
This section is empty.
Functions ¶
func NewECSClient ¶
func NewECSClient( credentialsProvider *credentials.Credentials, configAccessor config.AgentConfigAccessor, ec2MetadataClient ec2.EC2MetadataClient, agentVer string, options ...ECSClientOption) (ecs.ECSClient, error)
NewECSClient creates a new ECSClient interface object.
Types ¶
type ECSClientFactory ¶
type ECSClientFactory interface { // NewClient creates a new ECS client. NewClient() (ecs.ECSClient, error) // GetCredentials returns the credentials chain used by the ECS client. GetCredentials() *credentials.Credentials }
ECSClientFactory interface can be used to create new ECS clients. It wraps the internal ecsClientFactory and can help ease writing unit test code for consumers.
func NewECSClientFactory ¶
func NewECSClientFactory( credentialsProvider *credentials.Credentials, configAccessor config.AgentConfigAccessor, ec2MetadataClient ec2.EC2MetadataClient, agentVersion string, options ...ECSClientOption) ECSClientFactory
type ECSClientOption ¶
type ECSClientOption func(*ecsClient)
ECSClientOption allows for configuration of an ecsClient.
func WithDiscoverPollEndpointCache ¶
func WithDiscoverPollEndpointCache(c async.TTLCache) ECSClientOption
WithDiscoverPollEndpointCache is an ECSClientOption that configures the ecsClient.pollEndpointCache with the value passed as a parameter. This is especially useful for injecting a test implementation.
func WithDiscoverPollEndpointCacheTTL ¶
func WithDiscoverPollEndpointCacheTTL(t *async.TTL) ECSClientOption
WithDiscoverPollEndpointCacheTTL is an ECSClientOption that configures the ecsClient.pollEndpointCache.ttl with the value passed as a parameter.
func WithFIPSDetected ¶
func WithFIPSDetected(val bool) ECSClientOption
WithFIPSDetected is an ECSClientOption that configures the ecsClient.isFIPSDetected with the value passed as a parameter.
func WithIPv6PortBindingExcluded ¶
func WithIPv6PortBindingExcluded(val bool) ECSClientOption
WithIPv6PortBindingExcluded is an ECSClientOption that configures the ecsClient.shouldExcludeIPv6PortBinding with the value passed as a parameter.
func WithMetricsFactory ¶
func WithMetricsFactory(metricsFactory metrics.EntryFactory) ECSClientOption
WithMetricsFactory is an ECSClientOption that configures ecsClient.metricsFactory with the value passed as a parameter. This is especially useful for emitting metrics in the ECS Client
func WithSASCCustomRetryBackoff ¶
func WithSASCCustomRetryBackoff(f func(func() error) error) ECSClientOption
WithSASCCustomRetryBackoff is an ECSClientOption that configures the ecsClient.sascCustomRetryBackoff with the value passed as a parameter.
func WithSTSCAttachmentCustomRetryBackoff ¶
func WithSTSCAttachmentCustomRetryBackoff(f func(func() error) error) ECSClientOption
WithSTSCAttachmentCustomRetryBackoff is an ECSClientOption that configures the ecsClient.stscAttachmentCustomRetryBackoff with the value passed as a parameter.
func WithStandardClient ¶
func WithStandardClient(s ecs.ECSStandardSDK) ECSClientOption
WithStandardClient is an ECSClientOption that configures the ecsClient.standardClient with the value passed as a parameter. This is especially useful for injecting a test implementation.
func WithSubmitStateChangeClient ¶
func WithSubmitStateChangeClient(s ecs.ECSSubmitStateSDK) ECSClientOption
WithSubmitStateChangeClient is an ECSClientOption that configures the ecsClient.submitStateChangeClient with the value passed as a parameter. This is especially useful for injecting a test implementation.