txphase

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 3 Imported by: 1 module, 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 txphase owns HTTP transaction execution and COMMIT admission. Statements keep the request deadline; an admitted terminal commit owns its real outcome independently of that deadline or a subsequent disconnect.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommitAdmitted

func CommitAdmitted(ctx context.Context) bool

CommitAdmitted reports whether this request crossed the terminal commit boundary. HTTP can stop waiting at the execution deadline before admission, while preserving the result after admission.

func CommitContext

func CommitContext(ctx context.Context) (context.Context, error)

CommitContext is the only phase transition. Terminal owners call it after statement execution and arbitration, immediately before irreversible commit. Other transports retain their existing cancellation contract.

func ResultContext

func ResultContext(ctx context.Context) context.Context

ResultContext preserves the admitted terminal outcome through response projection, including any entity reads required to render it. It cannot admit a commit: unadmitted requests and independent statements keep cancellation.

func Statements

func Statements(ctx context.Context) context.Context

Statements keeps execution cancellation while preventing internal statements and independently committed batches from admitting their enclosing request.

func WithExecutionDeadline

func WithExecutionDeadline(ctx context.Context, timeout time.Duration) (context.Context, context.CancelFunc)

Types

This section is empty.

Jump to

Keyboard shortcuts

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