Documentation
¶
Index ¶
- Variables
- func ImplementTCC(v TccProxyService)
- type TCCResource
- type TCCResourceManager
- func (resourceManager TCCResourceManager) BranchCommit(ctx context.Context, request *apis.BranchCommitRequest) (*apis.BranchCommitResponse, error)
- func (resourceManager TCCResourceManager) BranchRollback(ctx context.Context, request *apis.BranchRollbackRequest) (*apis.BranchRollbackResponse, error)
- func (resourceManager TCCResourceManager) GetBranchType() apis.BranchSession_BranchType
- func (resourceManager TCCResourceManager) RegisterResource(resource model.Resource)
- func (resourceManager TCCResourceManager) UnregisterResource(resource model.Resource)
- type TccProxyService
- type TccService
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TccActionName = "TccActionName" TryMethod = "Try" ConfirmMethod = "Confirm" CancelMethod = "Cancel" ActionStartTime = "action-start-time" ActionName = "actionName" PrepareMethod = "sys::prepare" CommitMethod = "sys::commit" RollbackMethod = "sys::rollback" HostName = "host-name" TccMethodArguments = "arguments" TccMethodResult = "result" )
View Source
var (
TccActionContext = "actionContext"
)
Functions ¶
func ImplementTCC ¶
func ImplementTCC(v TccProxyService)
Types ¶
type TCCResource ¶
type TCCResource struct {
ActionName string
PrepareMethodName string
CommitMethodName string
CommitMethod *proxy.MethodDescriptor
RollbackMethodName string
RollbackMethod *proxy.MethodDescriptor
}
func (*TCCResource) GetBranchType ¶
func (resource *TCCResource) GetBranchType() apis.BranchSession_BranchType
func (*TCCResource) GetResourceID ¶
func (resource *TCCResource) GetResourceID() string
type TCCResourceManager ¶
func GetTCCResourceManager ¶
func GetTCCResourceManager() TCCResourceManager
func (TCCResourceManager) BranchCommit ¶
func (resourceManager TCCResourceManager) BranchCommit(ctx context.Context, request *apis.BranchCommitRequest) (*apis.BranchCommitResponse, error)
func (TCCResourceManager) BranchRollback ¶
func (resourceManager TCCResourceManager) BranchRollback(ctx context.Context, request *apis.BranchRollbackRequest) (*apis.BranchRollbackResponse, error)
func (TCCResourceManager) GetBranchType ¶
func (resourceManager TCCResourceManager) GetBranchType() apis.BranchSession_BranchType
func (TCCResourceManager) RegisterResource ¶
func (resourceManager TCCResourceManager) RegisterResource(resource model.Resource)
func (TCCResourceManager) UnregisterResource ¶
func (resourceManager TCCResourceManager) UnregisterResource(resource model.Resource)
type TccProxyService ¶
type TccProxyService interface {
GetTccService() TccService
}
type TccService ¶
type TccService interface {
Try(ctx *ctx.BusinessActionContext) (bool, error)
Confirm(ctx *ctx.BusinessActionContext) bool
Cancel(ctx *ctx.BusinessActionContext) bool
}
Click to show internal directories.
Click to hide internal directories.