s3

package
v1.6.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SignatureVersionV4 = "v4"
	SignatureVersionV2 = "v2"
)

Variables

This section is empty.

Functions

func NewBucketClient

func NewBucketClient(cfg Config, name string, logger log.Logger) (objstore.Bucket, error)

NewBucketClient creates a new S3 bucket client

func NewBucketReaderClient

func NewBucketReaderClient(cfg Config, name string, logger log.Logger) (objstore.BucketReader, error)

NewBucketReaderClient creates a new S3 bucket client

Types

type Config

type Config struct {
	Endpoint         string         `yaml:"endpoint"`
	BucketName       string         `yaml:"bucket_name"`
	SecretAccessKey  flagext.Secret `yaml:"secret_access_key"`
	AccessKeyID      string         `yaml:"access_key_id"`
	Insecure         bool           `yaml:"insecure"`
	SignatureVersion string         `yaml:"signature_version"`

	HTTP HTTPConfig `yaml:"http"`
}

Config holds the config options for an S3 backend

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers the flags for s3 storage with the provided prefix

func (*Config) RegisterFlagsWithPrefix

func (cfg *Config) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

RegisterFlagsWithPrefix registers the flags for s3 storage with the provided prefix

func (*Config) Validate

func (cfg *Config) Validate() error

Validate config and returns error on failure

type HTTPConfig

type HTTPConfig struct {
	IdleConnTimeout       time.Duration `yaml:"idle_conn_timeout"`
	ResponseHeaderTimeout time.Duration `yaml:"response_header_timeout"`
	InsecureSkipVerify    bool          `yaml:"insecure_skip_verify"`

	// Allow upstream callers to inject a round tripper
	Transport http.RoundTripper `yaml:"-"`
}

HTTPConfig stores the http.Transport configuration for the s3 minio client.

func (*HTTPConfig) RegisterFlagsWithPrefix

func (cfg *HTTPConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

RegisterFlagsWithPrefix registers the flags for s3 storage with the provided prefix

Jump to

Keyboard shortcuts

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