dispatcher

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

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

func New

func New(s Scalerer, m configmap.Mapper, l *log.Logger, mtr *Metrics) (*Dispatcher, error)

New returns a new Dispatcher.

func (*Dispatcher) Run

func (d *Dispatcher) Run(ctx context.Context)

Run starts dispatching auto scaling.

func (*Dispatcher) Stop

func (d *Dispatcher) Stop()

Stop the dispatcher.

type Metrics

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

DispatcherMetrics represents metrics associated to a dispatcher.

func NewMetrics

func NewMetrics() *Metrics

NewMetrics returns a new registered dispatcher Metrics.

type Options

type Options struct {
	RunInterval   fs.Duration `config:"run_interval"`
	GCRunInterval fs.Duration `config:"gc_run_interval"`
}

func (*Options) Name

func (o *Options) Name() string

type Scalerer

type Scalerer interface {
	Do(ctx context.Context)
	GC(ctx context.Context)
}

Jump to

Keyboard shortcuts

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