scaler

package
v0.0.0-...-ec0bc30 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DDBCWNamespace                = "AWS/DynamoDB"
	DDBReadThrottleEvents         = "ReadThrottleEvents"
	DDBWriteThrottleEvents        = "WriteThrottleEvents"
	DDBConsumedReadCapacityUnits  = "ConsumedReadCapacityUnits"
	DDBConsumedWriteCapacityUnits = "ConsumedWriteCapacityUnits"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AWSConfig      aws.Config
	Interval       time.Duration
	ScalingTargets []*TableScalingConfig
}

func (*Config) Check

func (cfg *Config) Check() error

type Scaler

type Scaler struct {
	Config Config
	// contains filtered or unexported fields
}

func New

func New(cfg Config) *Scaler

func (*Scaler) Run

func (s *Scaler) Run(ctx context.Context) error

type TableScalingConfig

type TableScalingConfig struct {
	TableName string

	ReadUpperBound      float64
	WriteUpperBound     float64
	ReadLowerBound      float64
	WriteLowerBound     float64
	ReadBufferCapacity  float64
	WriteBufferCapacity float64

	ScaleDownDelay time.Duration
	// contains filtered or unexported fields
}

func (*TableScalingConfig) String

func (tsc *TableScalingConfig) String() string

Jump to

Keyboard shortcuts

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