Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { // StartTransaction 开启新事务 NewTransaction(enableTxn bool, h http.Header, opts ...metadata.TxnOption) (Transaction, error) // AutoRun is a transaction wrapper. it will automatically commit or abort the // transaction depend on the f(), if f() returns with an error, then abort the // transaction, otherwise, it will commit the transaction. AutoRunTxn(ctx context.Context, enableTxn bool, h http.Header, run func() error, opts ...metadata.TxnOption) error }
Transaction interface
func NewTxn ¶
func NewTxn(client rest.ClientInterface) Interface
type Transaction ¶
Click to show internal directories.
Click to hide internal directories.