Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PgTxManager ¶
type PgTxManager struct {
// contains filtered or unexported fields
}
func NewPgTxManager ¶
func NewPgTxManager(poolMaster *pgxpool.Pool) *PgTxManager
func (*PgTxManager) Close ¶
func (m *PgTxManager) Close()
func (*PgTxManager) Conn ¶
func (m *PgTxManager) Conn() Transaction
func (*PgTxManager) RunMaster ¶
func (m *PgTxManager) RunMaster(ctx context.Context, fn func(ctxTx context.Context, tx Transaction) error) error
type PoolConfig ¶
type PoolConfig struct {
DSN string
}
type Transaction ¶
type TxManager ¶
type TxManager interface {
RunMaster(ctx context.Context, fn func(ctxTx context.Context, tx Transaction) error) error
RunReplica(ctx context.Context, fn func(ctxTx context.Context, tx Transaction) error) error
RunRepeatableRead(ctx context.Context, fn func(ctxTx context.Context, tx Transaction) error) error
}
Click to show internal directories.
Click to hide internal directories.