trx

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrStartTx = iota
	ErrCommit
	ErrCancel
)

Variables

This section is empty.

Functions

func Setup

func Setup(txm Manager)

func Tx added in v1.7.0

func Tx(ctx context.Context, h func(Context) error) error

Types

type Context added in v1.7.0

type Context interface {
	context.Context
	Commit() error
	Rollback()
	RollbackTo(name string)
	SavePoint(name string)
}

type Manager added in v1.7.0

type Manager interface {
	Start(ctx context.Context) (Context, error)
}

Jump to

Keyboard shortcuts

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