Documentation
¶
Index ¶
Constants ¶
const ( IntendedStateEnabled = "enabled" IntendedStateDisabled = "disabled" StateRunning = "running" StateStopped = "stopped" StateStarting = "starting" StateFailed = "failed" StatePaused = "paused" StateStopping = "stopping" )
State constants shared across all component types.
const ( KindTargets = "targets" KindOutputs = "outputs" KindInputs = "inputs" KindSubscriptions = "subscriptions" KindProcessors = "processors" KindAssignments = "assignments" KindTunnelTargetMatches = "tunnel-target-matches" )
Kind names used in the state store.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComponentState ¶
type ComponentState struct {
// Name string `json:"name"`
IntendedState string `json:"intended-state"` // enabled|disabled
State string `json:"state"` // running|stopped|starting|failed|paused|stopping
FailedReason string `json:"failed-reason,omitempty"` // last error message
LastUpdated time.Time `json:"last-updated"` // timestamp of last state transition
}
ComponentState is the base state shared by all managed components.
type InputState ¶
type InputState struct {
ComponentState
}
InputState extends ComponentState with input-specific fields.
type OutputState ¶
type OutputState struct {
ComponentState
}
OutputState extends ComponentState with output-specific fields.
type Store ¶
Store wraps both the config store and the state store. The config store holds user-defined configuration (targets, subscriptions, outputs, inputs, etc.). The state store holds runtime state for each component (running, stopped, failed, etc.).
type SubscriptionState ¶
type SubscriptionState struct {
ComponentState
Targets map[string]string `json:"targets,omitempty"` // target_name -> running|stopped|starting|failed|paused|stopping
}
SubscriptionState tracks a subscription's aggregate state across targets.
type TargetState ¶
type TargetState struct {
ComponentState
ConnectionState string `json:"connection-state,omitempty"` // gRPC connectivity: READY|CONNECTING|TRANSIENT_FAILURE|...
Subscriptions map[string]string `json:"subscriptions,omitempty"` // subscription_name -> running|stopped
}
TargetState extends ComponentState with target-specific fields.