Documentation
¶
Overview ¶
Package subjectcleanup coordinates restart-safe Subject expiry and teardown.
Index ¶
Constants ¶
View Source
const ( StageCancelWork = "cancel_work" StageDeleteSnapshots = "delete_snapshots" StageStopDeleteSandboxes = "stop_delete_sandboxes" StageReleaseResources = "release_resources" StageRequestWorkspace = "request_workspace_removal" StageAwaitAcknowledgements = "await_acknowledgements" StageSucceeded = "succeeded" StageFailed = "failed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionCanceller ¶
type SessionCanceller interface {
CancelSandboxSessions(context.Context, string, int64, string, time.Time) (int64, error)
}
SessionCanceller uses the acknowledged Runner cancellation path for active work.
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker advances at most one persisted Subject cleanup stage per pass.
func NewWorker ¶
func NewWorker( ctx context.Context, databaseURL string, sessions SessionCanceller, workerID string, claimDuration time.Duration, pollInterval time.Duration, ) (*Worker, error)
NewWorker connects the cleanup coordinator to PostgreSQL authority.
func (*Worker) PollInterval ¶
PollInterval is the bounded restart and notification fallback cadence.
Click to show internal directories.
Click to hide internal directories.