Documentation ¶
Index ¶
- Variables
- func ImplementTCC(v TCCServiceProxy)
- func InitTCCResourceManager()
- type TCCResource
- type TCCResourceManager
- func (resourceManager TCCResourceManager) BranchCommit(branchType meta.BranchType, xid string, branchID int64, resourceID string, ...) (meta.BranchStatus, error)
- func (resourceManager TCCResourceManager) BranchRollback(branchType meta.BranchType, xid string, branchID int64, resourceID string, ...) (meta.BranchStatus, error)
- func (resourceManager TCCResourceManager) GetBranchType() meta.BranchType
- type TCCService
- type TCCServiceProxy
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TCCActionName TCCActionName = "TCCActionName" // TryMethod TryMethod = "Try" // ConfirmMethod ConfirmMethod = "Confirm" // CancelMethod CancelMethod = "Cancel" // ActionStartTime ActionStartTime = "action-start-time" // ActionName ActionName = "actionName" // PrepareMethod PrepareMethod = "sys::prepare" // CommitMethod CommitMethod = "sys::commit" // RollbackMethod RollbackMethod = "sys::rollback" // HostName HostName = "host-name" // TCCMethodArguments TCCMethodArguments = "arguments" // TCCMethodResult TCCMethodResult = "result" )
View Source
var (
TCC_ACTION_CONTEXT = "actionContext"
)
Functions ¶
func ImplementTCC ¶
func ImplementTCC(v TCCServiceProxy)
func InitTCCResourceManager ¶
func InitTCCResourceManager()
Types ¶
type TCCResource ¶
type TCCResource struct { ResourceGroupID string AppName string ActionName string PrepareMethodName string CommitMethodName string CommitMethod *proxy.MethodDescriptor RollbackMethodName string RollbackMethod *proxy.MethodDescriptor }
func (*TCCResource) GetBranchType ¶
func (resource *TCCResource) GetBranchType() meta.BranchType
func (*TCCResource) GetResourceGroupID ¶
func (resource *TCCResource) GetResourceGroupID() string
func (*TCCResource) GetResourceID ¶
func (resource *TCCResource) GetResourceID() string
type TCCResourceManager ¶
type TCCResourceManager struct {
rm.AbstractResourceManager
}
func (TCCResourceManager) BranchCommit ¶
func (resourceManager TCCResourceManager) BranchCommit(branchType meta.BranchType, xid string, branchID int64, resourceID string, applicationData []byte) (meta.BranchStatus, error)
func (TCCResourceManager) BranchRollback ¶
func (resourceManager TCCResourceManager) BranchRollback(branchType meta.BranchType, xid string, branchID int64, resourceID string, applicationData []byte) (meta.BranchStatus, error)
func (TCCResourceManager) GetBranchType ¶
func (resourceManager TCCResourceManager) GetBranchType() meta.BranchType
type TCCService ¶
type TCCService interface { Try(ctx *context.BusinessActionContext) (bool, error) Confirm(ctx *context.BusinessActionContext) bool Cancel(ctx *context.BusinessActionContext) bool }
type TCCServiceProxy ¶
type TCCServiceProxy interface {
GetTCCService() TCCService
}
Click to show internal directories.
Click to hide internal directories.