Documentation
¶
Overview ¶
Package lifecycle owns process lifecycle state shared by backend and frontend runtimes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DrainLifecycle ¶
type DrainLifecycle struct {
// contains filtered or unexported fields
}
DrainLifecycle tracks whether a process has started graceful drain.
func NewDrainLifecycle ¶
func NewDrainLifecycle() *DrainLifecycle
NewDrainLifecycle creates process-local drain state for readiness checks and shutdown.
func (*DrainLifecycle) BeginDrain ¶
func (d *DrainLifecycle) BeginDrain() bool
BeginDrain marks the process as draining and reports whether this call changed state.
func (*DrainLifecycle) IsDraining ¶
func (d *DrainLifecycle) IsDraining() bool
IsDraining reports whether readiness should reject new traffic for shutdown drain.
func (*DrainLifecycle) WaitDrainWindow ¶
WaitDrainWindow waits for external traffic routing to observe not-ready state.
Click to show internal directories.
Click to hide internal directories.