Documentation ¶
Index ¶
- Variables
- func ImplementTCC(v TccProxyService)
- 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 TccProxyService
- type TccService
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TCC_ACTION_NAME = "TccActionName" TRY_METHOD = "Try" CONFIRM_METHOD = "Confirm" CANCEL_METHOD = "Cancel" ACTION_START_TIME = "action-start-time" ACTION_NAME = "actionName" PREPARE_METHOD = "sys::prepare" COMMIT_METHOD = "sys::commit" ROLLBACK_METHOD = "sys::rollback" HOST_NAME = "host-name" TCC_METHOD_ARGUMENTS = "arguments" TCC_METHOD_RESULT = "result" )
View Source
var (
TCC_ACTION_CONTEXT = "actionContext"
)
Functions ¶
func ImplementTCC ¶
func ImplementTCC(v TccProxyService)
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 ¶ added in v0.2.0
func (resource *TCCResource) GetResourceGroupID() string
func (*TCCResource) GetResourceID ¶ added in v0.2.0
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 TccProxyService ¶
type TccProxyService interface {
GetTccService() TccService
}
type TccService ¶
type TccService interface { Try(ctx *context.BusinessActionContext) (bool, error) Confirm(ctx *context.BusinessActionContext) bool Cancel(ctx *context.BusinessActionContext) bool }
Click to show internal directories.
Click to hide internal directories.