package module
Version: v0.1.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2021 License: Apache-2.0 Imports: 14 Imported by: 17




This section is empty.


This section is empty.


func NewSigV4RoundTripper

func NewSigV4RoundTripper(cfg *SigV4Config, next http.RoundTripper) (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.


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"`

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(interface{}) error) error

func (*SigV4Config) Validate

func (c *SigV4Config) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL