package
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Jan 17, 2022
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func Close(cl Closer, fn func())
Close is convenient wrapper for closing after performing some action
func Lock(l Locker, fn func())
Lock simple wrapper for locking -> performing action -> unlocking
Tx (with.Tx()) encapsulates common pattern of transaction
TxContext encapsulates common pattern of transaction
type Closer interface {
Close() error
}
Closer interface with Close() error function
type Locker interface {
Lock()
Unlock()
}
TxFunc is func used to perform inside transaction
Source Files
¶
Click to show internal directories.
Click to hide internal directories.