appStatusPolling

package
v1.2.22 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: GPL-3.0 Imports: 6 Imported by: 1 module, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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