trafficweight

package
v0.0.0-...-b844935 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigReconcileLoop

func ConfigReconcileLoop(backend TrafficWeightBackend, c cache.Cache, seconds time.Duration, log log.Logger, events chan event.GenericEvent)

Types

type DynamoNoResultsError

type DynamoNoResultsError struct {
	// contains filtered or unexported fields
}

func (*DynamoNoResultsError) Error

func (e *DynamoNoResultsError) Error() string

type FakeBackend

type FakeBackend struct {
	Log logr.Logger
}

func (*FakeBackend) OnWeightUpdate

func (b *FakeBackend) OnWeightUpdate(config StoreConfig) error

func (*FakeBackend) ReadWeight

func (b *FakeBackend) ReadWeight() (int, error)

type Item

type Item struct {
	ClusterName   string
	DesiredWeight int
	CurrentWeight int
	HealthCheckID string
}

type StoreConfig

type StoreConfig struct {
	DesiredWeight    int
	CurrentWeight    int
	AWSHealthCheckID string
}
var Store StoreConfig

type TrafficWeightBackend

type TrafficWeightBackend interface {
	ReadWeight() (int, error)
	OnWeightUpdate(StoreConfig) error
}

func NewBackend

func NewBackend(backendType, clusterName string, awsRegion string, tableName string, awsHealthCheckID string, logger log.Logger) (TrafficWeightBackend, error)

func NewDynamodbBackend

func NewDynamodbBackend(logger logr.Logger, clusterName string, awsRegion string, tableName string) TrafficWeightBackend

func NewFakeBackend

func NewFakeBackend(logger logr.Logger) TrafficWeightBackend

Jump to

Keyboard shortcuts

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