Documentation
¶
Index ¶
- Constants
- func NewECSClient(credentialsCache *aws.CredentialsCache, ...) (ecs.ECSClient, error)
- type ECSClientFactory
- type ECSClientOption
- func WithAvailableMemoryProvider(availableMemoryProvider func() int32) ECSClientOption
- func WithDiscoverPollEndpointCache(c async.TTLCache) ECSClientOption
- func WithDiscoverPollEndpointCacheTTL(t *async.TTL) ECSClientOption
- func WithDualStackEnabled(val bool) ECSClientOption
- func WithFIPSDetected(val bool) ECSClientOption
- func WithIPv4PortBindingExcluded(val bool) ECSClientOption
- func WithIPv6PortBindingExcluded(val bool) ECSClientOption
- func WithMetricsFactory(metricsFactory metrics.EntryFactory) ECSClientOption
- func WithRCICustomRetryBackoff(backoff *retry.ExponentialBackoff) 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( credentialsCache *aws.CredentialsCache, 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() aws.CredentialsProvider }
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( credentialsCache *aws.CredentialsCache, 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 WithAvailableMemoryProvider ¶
func WithAvailableMemoryProvider(availableMemoryProvider func() int32) ECSClientOption
WithAvailableMemoryProvider is an ECSClientOption that configures a custom strategy for returning the default amount of available memory on a container instance in MiB.
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 WithDualStackEnabled ¶
func WithDualStackEnabled(val bool) ECSClientOption
WithDualStackEnabled is an ECSClientOption that configures the ecsClient.isDualStackEnabled 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 WithIPv4PortBindingExcluded ¶
func WithIPv4PortBindingExcluded(val bool) ECSClientOption
WithIPv4PortBindingExcluded is an ECSClientOption that configures the ecsClient.shouldExcludeIPv4PortBinding 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 WithRCICustomRetryBackoff ¶
func WithRCICustomRetryBackoff(backoff *retry.ExponentialBackoff) ECSClientOption
WithRCICustomRetryBackoff is an ECSClientOption that configures the ecsClient.rciRetryBackoff with the value passed as a parameter.
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.