Documentation
¶
Overview ¶
Package settle is the end of a Starfleet --wait: after a write's task succeeds, it re-reads the subject until the subject's status says the write is done. managed and byoc share it; each supplies its own read and its own status vocabulary.
Index ¶
Constants ¶
const Gone = "deleted"
Gone is the end state a delete waits for: the read answering 404, or a status of "deleted", which is what a soft-deleted managed branch reads as (measured 2026-10-28).
Variables ¶
This section is empty.
Functions ¶
func Await ¶
func Await( rt *module.Runtime, t Target, deadline time.Time, timeout int, interval, bound time.Duration, ) error
Await polls t until it reaches t.Want, sharing the deadline the task wait used. A succeeded task can leave the status a poll behind, so a transitional status is polled through; any other status is final and exits 1 naming it. bound is one request's allowance.
Types ¶
type Target ¶
type Target struct {
Noun string
ID string
Want string
// Transitional is the part of the module's status vocabulary a
// subject passes through on its way somewhere else. Any other
// status is where it has come to rest.
Transitional []string
// Read returns the subject's status, or a conn.ExitNotFound error
// once it is gone.
Read func(ctx context.Context) (string, error)
}
Target is the subject a wait re-reads and the status that means the write is done.