status

package
v0.114.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStatusNotReady = errors.New("report component status is not ready until service start")

ErrStatusNotReady is returned when trying to report status before service start

Functions

func NewReportStatusFunc added in v0.92.0

func NewReportStatusFunc(
	id *componentstatus.InstanceID,
	srvStatus ServiceStatusFunc,
) func(*componentstatus.Event)

NewReportStatusFunc returns a function to be used as ReportStatus for componentstatus.TelemetrySettings

Types

type InvalidTransitionFunc added in v0.92.0

type InvalidTransitionFunc func(error)

InvalidTransitionFunc is the receiver of invalid transition errors

type NotifyStatusFunc

type NotifyStatusFunc func(*componentstatus.InstanceID, *componentstatus.Event)

NotifyStatusFunc is the receiver of status events after successful state transitions

type Reporter added in v0.91.0

type Reporter interface {
	ReportStatus(id *componentstatus.InstanceID, ev *componentstatus.Event)
	ReportOKIfStarting(id *componentstatus.InstanceID)
}

Reporter handles component status reporting

func NewReporter added in v0.91.0

func NewReporter(onStatusChange NotifyStatusFunc, onInvalidTransition InvalidTransitionFunc) Reporter

NewReporter returns a reporter that will invoke the NotifyStatusFunc when a component's status has changed.

type ServiceStatusFunc

type ServiceStatusFunc func(*componentstatus.InstanceID, *componentstatus.Event)

ServiceStatusFunc is the expected type of ReportStatus

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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