updater

package
v0.1.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUpdater

func RegisterUpdater(name string, isDefaultEnabled bool, factory func(logger log.Logger) (Updater, error))

Register updater

Types

type UnitUpdater

type UnitUpdater struct {
	Names    []string
	Updaters []Updater
	Logger   log.Logger
}

UnitUpdater implements the interface to update compute units from different updaters.

func NewUnitUpdater

func NewUnitUpdater(logger log.Logger) (*UnitUpdater, error)

NewUnitUpdater creates a new UnitUpdater

func (UnitUpdater) Update

func (u UnitUpdater) Update(queryTime time.Time, units []types.Unit) []types.Unit

Update implements updating units using registered updaters

type Updater

type Updater interface {
	Update(queryTime time.Time, units []types.Unit) []types.Unit
}

Unit updater interface

func NewTSDBUpdater

func NewTSDBUpdater(logger log.Logger) (Updater, error)

Factory to create a new updater interface

Jump to

Keyboard shortcuts

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