Documentation
¶
Index ¶
- Constants
- type ConnectionProxyXA
- func (c *ConnectionProxyXA) Close() error
- func (c *ConnectionProxyXA) CloseForce() error
- func (c *ConnectionProxyXA) Commit() error
- func (c *ConnectionProxyXA) GetAutoCommit() bool
- func (c *ConnectionProxyXA) GetPrepareTime() int64
- func (c *ConnectionProxyXA) IsHeld() bool
- func (c *ConnectionProxyXA) Rollback() error
- func (c *ConnectionProxyXA) SetAutoCommit(autoCommit bool) error
- func (c *ConnectionProxyXA) SetHeld(kept bool)
- func (c *ConnectionProxyXA) ShouldBeHeld() bool
- func (c *ConnectionProxyXA) XaCommit(xid string, branchId int64) error
- func (c *ConnectionProxyXA) XaRollback(xaXid XAXid) error
- func (c *ConnectionProxyXA) XaRollbackByBranchId(xid string, branchId int64)
- type Option
- type XABranchXid
- type XAConnection
- type XAXid
- type Xid
Constants ¶
View Source
const ( BranchIdPrefix = "-" SeataXaXidFormatId = 9752 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionProxyXA ¶ added in v1.1.0
type ConnectionProxyXA struct {
// contains filtered or unexported fields
}
func NewConnectionProxyXA ¶ added in v1.1.0
func NewConnectionProxyXA(originalConnection sql.Conn, xaConnection XAConnection, resource sql.BaseDataSourceResource, xid string) (*ConnectionProxyXA, error)
func (*ConnectionProxyXA) Close ¶ added in v1.1.0
func (c *ConnectionProxyXA) Close() error
func (*ConnectionProxyXA) CloseForce ¶ added in v1.1.0
func (c *ConnectionProxyXA) CloseForce() error
func (*ConnectionProxyXA) Commit ¶ added in v1.1.0
func (c *ConnectionProxyXA) Commit() error
func (*ConnectionProxyXA) GetAutoCommit ¶ added in v1.1.0
func (c *ConnectionProxyXA) GetAutoCommit() bool
func (*ConnectionProxyXA) GetPrepareTime ¶ added in v1.1.0
func (c *ConnectionProxyXA) GetPrepareTime() int64
func (*ConnectionProxyXA) IsHeld ¶ added in v1.1.0
func (c *ConnectionProxyXA) IsHeld() bool
func (*ConnectionProxyXA) Rollback ¶ added in v1.1.0
func (c *ConnectionProxyXA) Rollback() error
func (*ConnectionProxyXA) SetAutoCommit ¶ added in v1.1.0
func (c *ConnectionProxyXA) SetAutoCommit(autoCommit bool) error
func (*ConnectionProxyXA) SetHeld ¶ added in v1.1.0
func (c *ConnectionProxyXA) SetHeld(kept bool)
func (*ConnectionProxyXA) ShouldBeHeld ¶ added in v1.1.0
func (c *ConnectionProxyXA) ShouldBeHeld() bool
func (*ConnectionProxyXA) XaCommit ¶ added in v1.1.0
func (c *ConnectionProxyXA) XaCommit(xid string, branchId int64) error
func (*ConnectionProxyXA) XaRollback ¶ added in v1.1.0
func (c *ConnectionProxyXA) XaRollback(xaXid XAXid) error
func (*ConnectionProxyXA) XaRollbackByBranchId ¶ added in v1.1.0
func (c *ConnectionProxyXA) XaRollbackByBranchId(xid string, branchId int64)
type Option ¶
type Option func(*XABranchXid)
func WithBranchId ¶
func WithBranchQualifier ¶
func WithGlobalTransactionId ¶
type XABranchXid ¶
type XABranchXid struct {
// contains filtered or unexported fields
}
func Build ¶
func Build(xid string, branchId int64) *XABranchXid
func BuildWithByte ¶
func BuildWithByte(globalTransactionId []byte, branchQualifier []byte) *XABranchXid
func NewXABranchXid ¶
func NewXABranchXid(opt ...Option) *XABranchXid
func (*XABranchXid) GetBranchId ¶
func (x *XABranchXid) GetBranchId() int64
func (*XABranchXid) GetBranchQualifier ¶
func (x *XABranchXid) GetBranchQualifier() []byte
func (*XABranchXid) GetFormatId ¶
func (x *XABranchXid) GetFormatId() int
func (*XABranchXid) GetGlobalTransactionId ¶
func (x *XABranchXid) GetGlobalTransactionId() []byte
func (*XABranchXid) GetGlobalXid ¶
func (x *XABranchXid) GetGlobalXid() string
func (*XABranchXid) String ¶
func (x *XABranchXid) String() string
type XAConnection ¶ added in v1.1.0
type XAConnection interface {
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.