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
Click to show internal directories.
Click to hide internal directories.