Documentation ¶
Index ¶
- Constants
- func GetDistributedTransactionManager() proto.TransactionManager
- func InitDistributedTransactionManager(conf *config.DistributedTransaction)
- type DistributedTransactionManager
- func (manager *DistributedTransactionManager) Begin(ctx context.Context, transactionName string, timeout int32) (string, error)
- func (manager *DistributedTransactionManager) BranchRegister(ctx context.Context, in *proto.BranchRegister) (string, int64, error)
- func (manager *DistributedTransactionManager) BranchReport(ctx context.Context, branchID string, status api.BranchSession_BranchStatus) error
- func (manager *DistributedTransactionManager) Commit(ctx context.Context, xid string) (api.GlobalSession_GlobalStatus, error)
- func (manager *DistributedTransactionManager) IsLockable(ctx context.Context, resourceID, lockKey string) (bool, error)
- func (manager *DistributedTransactionManager) IsLockableWithXID(ctx context.Context, resourceID, lockKey, xid string) (bool, error)
- func (manager *DistributedTransactionManager) IsRollingBackDead(bs *api.BranchSession) bool
- func (manager *DistributedTransactionManager) ReleaseLockKeys(ctx context.Context, resourceID string, lockKeys []string) (bool, error)
- func (manager *DistributedTransactionManager) Rollback(ctx context.Context, xid string) (api.GlobalSession_GlobalStatus, error)
Constants ¶
View Source
const DefaultRetryDeadThreshold = 130 * 1000
Variables ¶
This section is empty.
Functions ¶
func GetDistributedTransactionManager ¶
func GetDistributedTransactionManager() proto.TransactionManager
func InitDistributedTransactionManager ¶
func InitDistributedTransactionManager(conf *config.DistributedTransaction)
Types ¶
type DistributedTransactionManager ¶
type DistributedTransactionManager struct {
// contains filtered or unexported fields
}
func (*DistributedTransactionManager) BranchRegister ¶
func (manager *DistributedTransactionManager) BranchRegister(ctx context.Context, in *proto.BranchRegister) (string, int64, error)
func (*DistributedTransactionManager) BranchReport ¶
func (manager *DistributedTransactionManager) BranchReport(ctx context.Context, branchID string, status api.BranchSession_BranchStatus) error
func (*DistributedTransactionManager) Commit ¶
func (manager *DistributedTransactionManager) Commit(ctx context.Context, xid string) (api.GlobalSession_GlobalStatus, error)
func (*DistributedTransactionManager) IsLockable ¶
func (*DistributedTransactionManager) IsLockableWithXID ¶ added in v1.0.2
func (*DistributedTransactionManager) IsRollingBackDead ¶
func (manager *DistributedTransactionManager) IsRollingBackDead(bs *api.BranchSession) bool
func (*DistributedTransactionManager) ReleaseLockKeys ¶
func (*DistributedTransactionManager) Rollback ¶
func (manager *DistributedTransactionManager) Rollback(ctx context.Context, xid string) (api.GlobalSession_GlobalStatus, error)
Click to show internal directories.
Click to hide internal directories.