Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSigV4RoundTripper ¶
func NewSigV4RoundTripper(cfg *SigV4Config, next http.RoundTripper, opts ...Option) (http.RoundTripper, error)
NewSigV4RoundTripper returns a new http.RoundTripper that will sign requests using Amazon's Signature Verification V4 signing procedure. The request will then be handed off to the next RoundTripper provided by next. If next is nil, http.DefaultTransport will be used.
Credentials for signing are retrieved using the the default AWS credential chain. If credentials cannot be found, an error will be returned.
Types ¶
type Option ¶ added in v0.5.0
type Option func(*options)
Option configures NewSigV4RoundTripper.
func WithContext ¶ added in v0.5.0
WithContext sets the context used during AWS configuration loading and credential retrieval.
type SigV4Config ¶
type SigV4Config struct {
Region string `yaml:"region,omitempty"`
AccessKey string `yaml:"access_key,omitempty"`
SecretKey config.Secret `yaml:"secret_key,omitempty"`
Profile string `yaml:"profile,omitempty"`
RoleARN string `yaml:"role_arn,omitempty"`
ExternalID string `yaml:"external_id,omitempty"`
SessionName string `yaml:"session_name,omitempty"`
Tags map[string]string `yaml:"tags,omitempty"`
UseFIPSSTSEndpoint bool `yaml:"use_fips_sts_endpoint,omitempty"`
ServiceName string `yaml:"service_name,omitempty"`
}
SigV4Config is the configuration for signing remote write requests with AWS's SigV4 verification process. Empty values will be retrieved using the AWS default credentials chain.
func (*SigV4Config) UnmarshalYAML ¶
func (c *SigV4Config) UnmarshalYAML(unmarshal func(any) error) error
func (*SigV4Config) Validate ¶
func (c *SigV4Config) Validate() error