Versions in this module Expand all Collapse all v2 v2.0.7 Sep 17, 2021 v2.0.6 Sep 16, 2021 Changes in this version + const DefaultGlobalTxName + const DefaultGlobalTxTimeout + func Implement(v GlobalTransactionProxyService) + func InitTransactionManager(addressing string, client apis.TransactionManagerServiceClient) + type DefaultGlobalTransaction struct + Role GlobalTransactionRole + Status apis.GlobalSession_GlobalStatus + XID string + func CreateNew() *DefaultGlobalTransaction + func GetCurrent(ctx *ctx.RootContext) *DefaultGlobalTransaction + func GetCurrentOrCreate(ctx *ctx.RootContext) *DefaultGlobalTransaction + func (gtx *DefaultGlobalTransaction) Begin(ctx *ctx.RootContext) error + func (gtx *DefaultGlobalTransaction) BeginWithTimeout(timeout int32, ctx *ctx.RootContext) error + func (gtx *DefaultGlobalTransaction) BeginWithTimeoutAndName(timeout int32, name string, ctx *ctx.RootContext) error + func (gtx *DefaultGlobalTransaction) Commit(ctx *ctx.RootContext) error + func (gtx *DefaultGlobalTransaction) GetLocalStatus() apis.GlobalSession_GlobalStatus + func (gtx *DefaultGlobalTransaction) GetStatus(ctx *ctx.RootContext) (apis.GlobalSession_GlobalStatus, error) + func (gtx *DefaultGlobalTransaction) GetXid(ctx *ctx.RootContext) string + func (gtx *DefaultGlobalTransaction) GlobalReport(globalStatus apis.GlobalSession_GlobalStatus, ctx *ctx.RootContext) error + func (gtx *DefaultGlobalTransaction) Resume(suspendedResourcesHolder *SuspendedResourcesHolder, ctx *ctx.RootContext) error + func (gtx *DefaultGlobalTransaction) Rollback(ctx *ctx.RootContext) error + func (gtx *DefaultGlobalTransaction) Suspend(unbindXid bool, ctx *ctx.RootContext) (*SuspendedResourcesHolder, error) + type GlobalTransaction interface + Begin func(ctx *ctx.RootContext) error + BeginWithTimeout func(timeout int32, ctx *ctx.RootContext) error + BeginWithTimeoutAndName func(timeout int32, name string, ctx *ctx.RootContext) error + Commit func(ctx *ctx.RootContext) error + GetLocalStatus func() apis.GlobalSession_GlobalStatus + GetStatus func(ctx *ctx.RootContext) (apis.GlobalSession_GlobalStatus, error) + GetXid func(ctx *ctx.RootContext) string + GlobalReport func(globalStatus apis.GlobalSession_GlobalStatus, ctx *ctx.RootContext) error + Resume func(suspendedResourcesHolder *SuspendedResourcesHolder, ctx *ctx.RootContext) error + Rollback func(ctx *ctx.RootContext) error + Suspend func(unbindXid bool, ctx *ctx.RootContext) (*SuspendedResourcesHolder, error) + type GlobalTransactionProxyService interface + GetMethodTransactionInfo func(methodName string) *model.TransactionInfo + GetProxyService func() interface{} + type GlobalTransactionRole byte + const Launcher + const Participant + func (role GlobalTransactionRole) String() string + type SuspendedResourcesHolder struct + Xid string + type TransactionManager struct + func GetTransactionManager() *TransactionManager + func (manager *TransactionManager) Begin(ctx context.Context, name string, timeout int32) (string, error) + func (manager *TransactionManager) Commit(ctx context.Context, xid string) (apis.GlobalSession_GlobalStatus, error) + func (manager *TransactionManager) GetStatus(ctx context.Context, xid string) (apis.GlobalSession_GlobalStatus, error) + func (manager *TransactionManager) GlobalReport(ctx context.Context, xid string, globalStatus apis.GlobalSession_GlobalStatus) (apis.GlobalSession_GlobalStatus, error) + func (manager *TransactionManager) Rollback(ctx context.Context, xid string) (apis.GlobalSession_GlobalStatus, error) + type TransactionManagerInterface interface + Begin func(ctx context.Context, name string, timeout int32) (string, error) + Commit func(ctx context.Context, xid string) (apis.GlobalSession_GlobalStatus, error) + GetStatus func(ctx context.Context, xid string) (apis.GlobalSession_GlobalStatus, error) + GlobalReport func(ctx context.Context, xid string, globalStatus apis.GlobalSession_GlobalStatus) (apis.GlobalSession_GlobalStatus, error) + Rollback func(ctx context.Context, xid string) (apis.GlobalSession_GlobalStatus, error)