MCPcopy Create free account
hub / github.com/PostHog/duckgres / NormalizedLifecycle

Method NormalizedLifecycle

controlplane/worker_state.go:87–92  ·  view source on GitHub ↗

NormalizedLifecycle treats the zero value as an idle, unassigned worker so existing worker structs can adopt this model without extra initialization.

()

Source from the content-addressed store, hash-verified

85// NormalizedLifecycle treats the zero value as an idle, unassigned worker so
86// existing worker structs can adopt this model without extra initialization.
87func (s SharedWorkerState) NormalizedLifecycle() WorkerLifecycleState {
88 if s.Lifecycle == "" {
89 return WorkerLifecycleIdle
90 }
91 return s.Lifecycle
92}
93
94// Validate checks that the lifecycle and assignment metadata are internally
95// consistent.

Calls

no outgoing calls