meta

package
v0.0.0-...-e946c5d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchStatus

type BranchStatus byte
const (
	/**
	 * The BranchStatus_Unknown.
	 * description:BranchStatus_Unknown branch status.
	 */
	BranchStatusUnknown BranchStatus = iota

	/**
	 * The BranchStatus_Registered.
	 * description:BranchStatus_Registered to TC.
	 */
	BranchStatusRegistered

	/**
	 * The Phase one done.
	 * description:Branch logic is successfully done at phase one.
	 */
	BranchStatusPhaseoneDone

	/**
	 * The Phase one failed.
	 * description:Branch logic is failed at phase one.
	 */
	BranchStatusPhaseoneFailed

	/**
	 * The Phase one timeout.
	 * description:Branch logic is NOT reported for a timeout.
	 */
	BranchStatusPhaseoneTimeout

	/**
	 * The Phase two committed.
	 * description:Commit logic is successfully done at phase two.
	 */
	BranchStatusPhasetwoCommitted

	/**
	 * The Phase two commit failed retryable.
	 * description:Commit logic is failed but retryable.
	 */
	BranchStatusPhasetwoCommitFailedRetryable

	/**
	 * The Phase two commit failed unretryable.
	 * description:Commit logic is failed and NOT retryable.
	 */
	BranchStatusPhasetwoCommitFailedUnretryable

	/**
	 * The Phase two rollbacked.
	 * description:Rollback logic is successfully done at phase two.
	 */
	BranchStatusPhasetwoRollbacked

	/**
	 * The Phase two rollback failed retryable.
	 * description:Rollback logic is failed but retryable.
	 */
	BranchStatusPhasetwoRollbackFailedRetryable

	/**
	 * The Phase two rollback failed unretryable.
	 * description:Rollback logic is failed but NOT retryable.
	 */
	BranchStatusPhasetwoRollbackFailedUnretryable
)

func (BranchStatus) String

func (s BranchStatus) String() string

type BranchType

type BranchType byte
const (
	/**
	 * The At.
	 */
	// BranchType_AT Branch
	BranchTypeAT BranchType = iota

	/**
	 * The BranchType_TCC.
	 */
	BranchTypeTCC

	/**
	 * The BranchType_SAGA.
	 */
	BranchTypeSAGA
)

func ValueOfBranchType

func ValueOfBranchType(branchType string) BranchType

func (BranchType) String

func (t BranchType) String() string

type GlobalStatus

type GlobalStatus int32
const (
	/**
	 * Un known global status.
	 */
	// BranchStatus_Unknown
	GlobalStatusUnknown GlobalStatus = iota

	/**
	 * The GlobalStatus_Begin.
	 */
	// PHASE 1: can accept new branch registering.
	GlobalStatusBegin

	/**
	 * PHASE 2: Running Status: may be changed any time.
	 */
	// Committing.
	GlobalStatusCommitting

	/**
	 * The Commit retrying.
	 */
	// Retrying commit after a recoverable failure.
	GlobalStatusCommitRetrying

	/**
	 * Rollbacking global status.
	 */
	// Rollbacking
	GlobalStatusRollbacking

	/**
	 * The Rollback retrying.
	 */
	// Retrying rollback after a recoverable failure.
	GlobalStatusRollbackRetrying

	/**
	 * The Timeout rollbacking.
	 */
	// Rollbacking since timeout
	GlobalStatusTimeoutRollbacking

	/**
	 * The Timeout rollback retrying.
	 */
	// Retrying rollback (since timeout) after a recoverable failure.
	GlobalStatusTimeoutRollbackRetrying

	/**
	 * All branches can be async committed. The committing is NOT done yet, but it can be seen as committed for TM/RM
	 * client.
	 */
	GlobalStatusAsyncCommitting

	/**
	 * PHASE 2: Final Status: will NOT change any more.
	 */
	// Finally: global transaction is successfully committed.
	GlobalStatusCommitted

	/**
	 * The Commit failed.
	 */
	// Finally: failed to commit
	GlobalStatusCommitFailed

	/**
	 * The Rollbacked.
	 */
	// Finally: global transaction is successfully rollbacked.
	GlobalStatusRollbacked

	/**
	 * The Rollback failed.
	 */
	// Finally: failed to rollback
	GlobalStatusRollbackFailed

	/**
	 * The Timeout rollbacked.
	 */
	// Finally: global transaction is successfully rollbacked since timeout.
	GlobalStatusTimeoutRollbacked

	/**
	 * The Timeout rollback failed.
	 */
	// Finally: failed to rollback since timeout
	GlobalStatusTimeoutRollbackFailed

	/**
	 * The Finished.
	 */
	// Not managed in getty_session MAP any more
	GlobalStatusFinished
)

func (GlobalStatus) String

func (s GlobalStatus) String() string

type TransactionException

type TransactionException struct {
	Code    TransactionExceptionCode
	Message string
	Err     error
}

func (TransactionException) Error

func (e TransactionException) Error() string

Error 隐式继承 builtin.error 接口

func (TransactionException) Unwrap

func (e TransactionException) Unwrap() error

type TransactionExceptionCode

type TransactionExceptionCode byte
const (
	/**
	 * Unknown transaction exception code.
	 */
	TransactionExceptionCodeUnknown TransactionExceptionCode = iota

	/**
	 * BeginFailed
	 */
	TransactionExceptionCodeBeginFailed

	/**
	 * Lock key conflict transaction exception code.
	 */
	TransactionExceptionCodeLockKeyConflict

	/**
	 * Io transaction exception code.
	 */
	IO

	/**
	 * Branch rollback failed retriable transaction exception code.
	 */
	TransactionExceptionCodeBranchRollbackFailedRetriable

	/**
	 * Branch rollback failed unretriable transaction exception code.
	 */
	TransactionExceptionCodeBranchRollbackFailedUnretriable

	/**
	 * Branch register failed transaction exception code.
	 */
	TransactionExceptionCodeBranchRegisterFailed

	/**
	 * Branch report failed transaction exception code.
	 */
	TransactionExceptionCodeBranchReportFailed

	/**
	 * Lockable check failed transaction exception code.
	 */
	TransactionExceptionCodeLockableCheckFailed

	/**
	 * Branch transaction not exist transaction exception code.
	 */
	TransactionExceptionCodeBranchTransactionNotExist

	/**
	 * Global transaction not exist transaction exception code.
	 */
	TransactionExceptionCodeGlobalTransactionNotExist

	/**
	 * Global transaction not active transaction exception code.
	 */
	TransactionExceptionCodeGlobalTransactionNotActive

	/**
	 * Global transaction status invalid transaction exception code.
	 */
	TransactionExceptionCodeGlobalTransactionStatusInvalid

	/**
	 * Failed to send branch commit request transaction exception code.
	 */
	TransactionExceptionCodeFailedToSendBranchCommitRequest

	/**
	 * Failed to send branch rollback request transaction exception code.
	 */
	TransactionExceptionCodeFailedToSendBranchRollbackRequest

	/**
	 * Failed to add branch transaction exception code.
	 */
	TransactionExceptionCodeFailedToAddBranch

	/**
	 * Failed to lock global transaction exception code.
	 */
	TransactionExceptionCodeFailedLockGlobalTranscation

	/**
	 * FailedWriteSession
	 */
	TransactionExceptionCodeFailedWriteSession

	/**
	 * Failed to holder exception code
	 */
	FailedStore
)

type TransactionRole

type TransactionRole byte
const (
	/**
	 * tm
	 */
	TMROLE TransactionRole = iota
	/**
	 * rm
	 */
	RMROLE
	/**
	 * server
	 */
	SERVERROLE
)

func (TransactionRole) String

func (r TransactionRole) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL