appStatusPolling

package
v1.0.47 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: GPL-3.0 Imports: 4 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 ErrPollingDurationNegative = errors.New("polling duration must be a positive number")

ErrPollingDurationNegative will be returned when the polling duration is not a positive number

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, pollingDurationSec int) (*AppStatusPolling, error)

NewAppStatusPolling will return an instance of AppStatusPolling

func (*AppStatusPolling) Poll

func (asp *AppStatusPolling) Poll()

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