Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transaction ¶
type Transaction []TransactionInf
func (*Transaction) RegisterTransaction ¶
func (ts *Transaction) RegisterTransaction(t TransactionInf)
func (*Transaction) Transaction ¶
Transaction 开启一个事务 f(). useage: e := ts.Transaction(&c, func()error{return nil}) 传进来的c会被修改,如果希望事务结束之后不影响c,那么需要: ctx := c e := ts.Transaction(&ctx, func()error{return nil})
Click to show internal directories.
Click to hide internal directories.