Versions in this module Expand all Collapse all v1 v1.2.1 May 30, 2024 Changes in this version + const TMEndRScan + const TMFail + const TMJoin + const TMNoFlags + const TMOnePhase + const TMResume + const TMStartRScan + const TMSuccess + const TMSuspend + const XAOk + const XAReadOnly + type MysqlXAConn struct + func NewMysqlXaConn(conn driver.Conn) *MysqlXAConn + func (c *MysqlXAConn) Commit(ctx context.Context, xid string, onePhase bool) error + func (c *MysqlXAConn) End(ctx context.Context, xid string, flags int) error + func (c *MysqlXAConn) Forget(ctx context.Context, xid string) error + func (c *MysqlXAConn) GetTransactionTimeout() time.Duration + func (c *MysqlXAConn) IsSameRM(ctx context.Context, xares XAResource) bool + func (c *MysqlXAConn) Recover(ctx context.Context, flag int) (xids []string, err error) + func (c *MysqlXAConn) Rollback(ctx context.Context, xid string) error + func (c *MysqlXAConn) SetTransactionTimeout(duration time.Duration) bool + func (c *MysqlXAConn) Start(ctx context.Context, xid string, flags int) error + func (c *MysqlXAConn) XAPrepare(ctx context.Context, xid string) error + type OracleXAConn struct + func (c *OracleXAConn) Commit(xid string, onePhase bool) error + func (c *OracleXAConn) End(xid string, flags int) error + func (c *OracleXAConn) Forget(xid string) error + func (c *OracleXAConn) GetTransactionTimeout() time.Duration + func (c *OracleXAConn) IsSameRM(resource XAResource) bool + func (c *OracleXAConn) Recover(flag int) []string + func (c *OracleXAConn) Rollback(xid string) error + func (c *OracleXAConn) SetTransactionTimeout(duration time.Duration) bool + func (c *OracleXAConn) Start(xid string, flags int) error + func (c *OracleXAConn) XAPrepare(xid string) (int, error) + type XAResource interface + Commit func(ctx context.Context, xid string, onePhase bool) error + End func(ctx context.Context, xid string, flags int) error + Forget func(ctx context.Context, xid string) error + GetTransactionTimeout func() time.Duration + IsSameRM func(ctx context.Context, resource XAResource) bool + Recover func(ctx context.Context, flag int) ([]string, error) + Rollback func(ctx context.Context, xid string) error + SetTransactionTimeout func(duration time.Duration) bool + Start func(ctx context.Context, xid string, flags int) error + XAPrepare func(ctx context.Context, xid string) error + func CreateXAResource(conn driver.Conn, dbType types.DBType) (XAResource, error)