Documentation
¶
Overview ¶
Package hoststate tracks ManagedService lifecycle state without depending on OpenTelemetry or any other third-party package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the stdlib-only bridge between one Host-managed service and the process-wide aggregate. Its identity is never included in metric labels.
func NewService ¶
NewService registers one ManagedService instance in the created state.
func (*Service) Transition ¶
Transition changes this instance's state once. Failed is sticky so cleanup attempts cannot hide the phase that caused the Host to roll back.
type State ¶
type State string
State is a finite ManagedService lifecycle state.
const ( StateCreated State = "created" StateStarting State = "starting" StateRunning State = "running" StateReady State = "ready" StateFailed State = "failed" StateDraining State = "draining" StateStopping State = "stopping" StateStopped State = "stopped" StateNotStarted State = "not_started" )
ManagedService lifecycle states. Their values are metric label values, so additions must remain finite and must not contain instance-specific data.