Documentation
¶
Index ¶
- Variables
- func CommitTransaction(ctx context.Context) error
- func IsError(err error) bool
- func IsErrorCode(err error, code Code) bool
- func IsTransactionRegistered(ctx context.Context) bool
- func IsTransactional(ctx context.Context) bool
- func OnTransactionCommitted(ctx context.Context, callback func())
- func RegisterTransaction(ctx context.Context, transaction any, commitFn func(ctx context.Context) error, ...)
- func RegisteredTransaction(ctx context.Context) any
- func RollbackTransaction(ctx context.Context) error
- func TransactionalContext(ctx context.Context) context.Context
- type Code
- type Driver
- type Error
- type LedgerStore
- type LedgerStoreProvider
- type LedgerStoreProviderFn
- type SystemStore
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrConfigurationNotFound = errors.New("configuration not found")
)
View Source
var (
ErrLedgerStoreNotFound = errors.New("ledger store not found")
)
Functions ¶
func CommitTransaction ¶ added in v1.8.0
func IsErrorCode ¶ added in v1.0.4
func IsTransactionRegistered ¶ added in v1.8.0
func IsTransactional ¶ added in v1.8.0
func OnTransactionCommitted ¶ added in v1.10.6
func RegisterTransaction ¶ added in v1.8.0
func RegisteredTransaction ¶ added in v1.8.0
func RollbackTransaction ¶ added in v1.8.0
Types ¶
type Driver ¶
type Driver[STORE any] interface { LedgerStoreProvider[STORE] Initialize(ctx context.Context) error Close(ctx context.Context) error Name() string GetSystemStore() SystemStore }
type LedgerStore ¶ added in v1.8.0
type LedgerStoreProvider ¶ added in v1.8.0
type LedgerStoreProviderFn ¶ added in v1.8.0
type LedgerStoreProviderFn[STORE any] func(ctx context.Context, name string, create bool) (STORE, bool, error)
func (LedgerStoreProviderFn[STORE]) GetLedgerStore ¶ added in v1.8.0
type SystemStore ¶ added in v1.8.0
Directories
¶
Path | Synopsis |
---|---|
File is part of the build only if cgo is enabled.
|
File is part of the build only if cgo is enabled. |
Click to show internal directories.
Click to hide internal directories.