settle

package
v0.5.1-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2026 License: PostgreSQL Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL