aws

package
v1.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Fixtures = []testutils.Fixture{
	fixture{
		// contains filtered or unexported fields
	},
	dynamoDBFixture(0, 10, 20),
	dynamoDBFixture(0, 0, 20),
	dynamoDBFixture(2, 10, 20),
}

Fixtures for testing the various configuration of AWS storage.

Functions

func NewDynamoDBChunkClient added in v0.7.0

func NewDynamoDBChunkClient(cfg DynamoDBConfig, schemaCfg chunk.SchemaConfig) (chunk.Client, error)

NewDynamoDBChunkClient makes a new DynamoDB-backed chunk.Client.

func NewDynamoDBIndexClient

func NewDynamoDBIndexClient(cfg DynamoDBConfig, schemaCfg chunk.SchemaConfig) (chunk.IndexClient, error)

NewDynamoDBIndexClient makes a new DynamoDB-backed IndexClient.

func NewDynamoDBTableClient

func NewDynamoDBTableClient(cfg DynamoDBConfig) (chunk.TableClient, error)

NewDynamoDBTableClient makes a new DynamoTableClient.

Types

type DynamoDBConfig

type DynamoDBConfig struct {
	DynamoDB               flagext.URLValue         `yaml:"dynamodb_url"`
	APILimit               float64                  `yaml:"api_limit"`
	ThrottleLimit          float64                  `yaml:"throttle_limit"`
	Metrics                MetricsAutoScalingConfig `yaml:"metrics"`
	ChunkGangSize          int                      `yaml:"chunk_gang_size"`
	ChunkGetMaxParallelism int                      `yaml:"chunk_get_max_parallelism"`
	// contains filtered or unexported fields
}

DynamoDBConfig specifies config for a DynamoDB database.

func (*DynamoDBConfig) RegisterFlags

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

RegisterFlags adds the flags required to config this to the given FlagSet

type MetricsAutoScalingConfig

type MetricsAutoScalingConfig struct {
	URL              string  `yaml:"url"`                   // URL to contact Prometheus store on
	TargetQueueLen   int64   `yaml:"target_queue_length"`   // Queue length above which we will scale up capacity
	ScaleUpFactor    float64 `yaml:"scale_up_factor"`       // Scale up capacity by this multiple
	MinThrottling    float64 `yaml:"ignore_throttle_below"` // Ignore throttling below this level
	QueueLengthQuery string  `yaml:"queue_length_query"`    // Promql query to fetch ingester queue length
	ThrottleQuery    string  `yaml:"write_throttle_query"`  // Promql query to fetch throttle rate per table
	UsageQuery       string  `yaml:"write_usage_query"`     // Promql query to fetch write capacity usage per table
	ReadUsageQuery   string  `yaml:"read_usage_query"`      // Promql query to fetch read usage per table
	ReadErrorQuery   string  `yaml:"read_error_query"`      // Promql query to fetch read errors per table
}

MetricsAutoScalingConfig holds parameters to configure how it works

func (*MetricsAutoScalingConfig) RegisterFlags

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

RegisterFlags adds the flags required to config this to the given FlagSet

type S3Config added in v0.7.0

type S3Config struct {
	S3               flagext.URLValue
	BucketNames      string
	S3ForcePathStyle bool
}

S3Config specifies config for storing chunks on AWS S3.

func (*S3Config) RegisterFlags added in v0.7.0

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

RegisterFlags adds the flags required to config this to the given FlagSet

func (*S3Config) RegisterFlagsWithPrefix added in v0.7.0

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

RegisterFlagsWithPrefix adds the flags required to config this to the given FlagSet with a specified prefix

type S3ObjectClient added in v0.7.0

type S3ObjectClient struct {
	S3 s3iface.S3API
	// contains filtered or unexported fields
}

func NewS3ObjectClient

func NewS3ObjectClient(cfg S3Config, delimiter string) (*S3ObjectClient, error)

NewS3ObjectClient makes a new S3-backed ObjectClient.

func (*S3ObjectClient) DeleteObject added in v0.7.0

func (a *S3ObjectClient) DeleteObject(ctx context.Context, objectKey string) error

DeleteObject deletes the specified objectKey from the appropriate S3 bucket

func (*S3ObjectClient) GetObject added in v0.7.0

func (a *S3ObjectClient) GetObject(ctx context.Context, objectKey string) (io.ReadCloser, error)

GetObject returns a reader for the specified object key from the configured S3 bucket. If the key does not exist a generic chunk.ErrStorageObjectNotFound error is returned.

func (*S3ObjectClient) List added in v0.7.0

List objects and common-prefixes i.e synthetic directories from the store non-recursively

func (*S3ObjectClient) PutObject added in v0.7.0

func (a *S3ObjectClient) PutObject(ctx context.Context, objectKey string, object io.ReadSeeker) error

Put object into the store

func (*S3ObjectClient) Stop added in v0.7.0

func (a *S3ObjectClient) Stop()

Stop fulfills the chunk.ObjectClient interface

type StorageConfig

type StorageConfig struct {
	DynamoDBConfig `yaml:"dynamodb"`
	S3Config       `yaml:",inline"`
}

StorageConfig specifies config for storing data on AWS.

func (*StorageConfig) RegisterFlags

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

RegisterFlags adds the flags required to config this to the given FlagSet

Jump to

Keyboard shortcuts

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