appStatusPolling

package
v1.2.18 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilAppStatusHandler = errors.New("appStatusHandler is nil")

ErrNilAppStatusHandler will be returned when the AppStatusHandler is nil

View Source
var ErrNilHandlerFunc = errors.New("handler function is nil")

ErrNilHandlerFunc will be returned when the handler function is nil

View Source
var ErrPollingDurationToSmall = errors.New("polling duration it's to small")

ErrPollingDurationToSmall will be returned when the polling duration is to small

Functions

This section is empty.

Types

type AppStatusPolling

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

AppStatusPolling will update an AppStatusHandler by polling components at a predefined interval

func NewAppStatusPolling

func NewAppStatusPolling(appStatusHandler core.AppStatusHandler, pollingDuration time.Duration, logger core.Logger) (*AppStatusPolling, error)

NewAppStatusPolling will return an instance of AppStatusPolling

func (*AppStatusPolling) Poll

func (asp *AppStatusPolling) Poll(ctx context.Context)

Poll will notify the AppStatusHandler at a given time

func (*AppStatusPolling) RegisterPollingFunc

func (asp *AppStatusPolling) RegisterPollingFunc(handler func(appStatusHandler core.AppStatusHandler)) error

RegisterPollingFunc will register a new handler function

Jump to

Keyboard shortcuts

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