txscope

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithIntent

func WithIntent(ctx context.Context, intent Intent) context.Context

WithIntent annotates ctx with the requested transaction intent.

Types

type Intent

type Intent string

Intent describes the transaction intent attached to a request context.

const (
	IntentRead  Intent = "read"
	IntentWrite Intent = "write"
)

func FromContext

func FromContext(ctx context.Context) (Intent, bool)

FromContext returns the transaction intent recorded on ctx, if any.

Jump to

Keyboard shortcuts

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