Documentation
¶
Overview ¶
Package awsutil provides the common utils for AWS components
Index ¶
- Constants
- func GetAWSConfig(logger *zap.Logger, settings *AWSSessionSettings) (awsv2.Config, error)
- func GetAWSConfigSession(logger *zap.Logger, cn ConnAttr, cfg *AWSSessionSettings) (*aws.Config, *session.Session, error)
- func GetDefaultSession(logger *zap.Logger) (*session.Session, error)
- func ProxyServerTransport(logger *zap.Logger, config *AWSSessionSettings) (*http.Transport, error)
- type AWSSessionSettings
- type Conn
- type ConnAttr
Constants ¶
View Source
const ( STSEndpointPrefix = "https://sts." STSEndpointSuffix = ".amazonaws.com" STSAwsCnPartitionIDSuffix = ".amazonaws.com.cn" // AWS China partition. )
AWS STS endpoint constants
Variables ¶
This section is empty.
Functions ¶
func GetAWSConfig ¶ added in v0.124.0
GetAWSConfig returns AWS config and session instances.
func GetAWSConfigSession ¶
func GetAWSConfigSession(logger *zap.Logger, cn ConnAttr, cfg *AWSSessionSettings) (*aws.Config, *session.Session, error)
GetAWSConfigSession returns AWS config and session instances.
func ProxyServerTransport ¶
ProxyServerTransport configures HTTP transport for TCP Proxy Server.
Types ¶
type AWSSessionSettings ¶
type AWSSessionSettings struct { // Maximum number of concurrent calls to AWS X-Ray to upload documents. NumberOfWorkers int `mapstructure:"num_workers"` // X-Ray service endpoint to which the collector sends segment documents. Endpoint string `mapstructure:"endpoint"` // Number of seconds before timing out a request. RequestTimeoutSeconds int `mapstructure:"request_timeout_seconds"` // Maximum number of retries before abandoning an attempt to post data. MaxRetries int `mapstructure:"max_retries"` // Enable or disable TLS certificate verification. NoVerifySSL bool `mapstructure:"no_verify_ssl"` // Upload segments to AWS X-Ray through a proxy. ProxyAddress string `mapstructure:"proxy_address"` // Send segments to AWS X-Ray service in a specific region. Region string `mapstructure:"region"` // Local mode to skip EC2 instance metadata check. LocalMode bool `mapstructure:"local_mode"` // Amazon Resource Name (ARN) of the AWS resource running the collector. ResourceARN string `mapstructure:"resource_arn"` // IAM role to upload segments to a different account. RoleARN string `mapstructure:"role_arn"` // External ID to verify third party role assumption ExternalID string `mapstructure:"external_id"` }
AWSSessionSettings defines the common session configs for AWS components
func CreateDefaultSessionConfig ¶
func CreateDefaultSessionConfig() AWSSessionSettings
Click to show internal directories.
Click to hide internal directories.