transaction_manager

package
v0.0.0-...-52e64fa Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoTransactionManager

type MongoTransactionManager struct {
	Ctx     context.Context
	Client  *mongo.Client
	Session mongo.Session
}

func NewMongoTransactionManager

func NewMongoTransactionManager(ctx context.Context, client *mongo.Client) *MongoTransactionManager

func (*MongoTransactionManager) WithSession

func (tm *MongoTransactionManager) WithSession(fn func(sc context.Context) error) error

type TransactionManager

type TransactionManager interface {
	WithSession(fn func(sc context.Context) error) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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