tx

package
v0.1.3-beta Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithTx

func WithTx(ctx context.Context, fn func() error) error

Types

type LynxTransactionManager

type LynxTransactionManager struct {
	// contains filtered or unexported fields
}

LynxTransactionManager is the local implementation of the TransactionManager

func (*LynxTransactionManager) WithTx

func (l *LynxTransactionManager) WithTx(ctx context.Context, fn func() error) error

type Transaction

type Transaction interface {
	Begin(ctx context.Context) error
	Commit(ctx context.Context) error
	Rollback(ctx context.Context) error
}

type TransactionManager

type TransactionManager interface {
	WithTx(ctx context.Context, fn func() error) error
	Transaction
}

func NewLynxTransactionManager

func NewLynxTransactionManager() TransactionManager

Jump to

Keyboard shortcuts

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