errors

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// TransactionErrorCodeUnknown Unknown transaction errors code.
	TransactionErrorCodeUnknown = TransactionErrorCode(0)

	// TransactionErrorCodeBeginFailed BeginFailed
	TransactionErrorCodeBeginFailed = TransactionErrorCode(1)

	// TransactionErrorCodeLockKeyConflict Lock key conflict transaction errors code.
	TransactionErrorCodeLockKeyConflict = TransactionErrorCode(2)

	// Io transaction errors code.
	IO = TransactionErrorCode(3)

	// TransactionErrorCodeBranchRollbackFailedRetriable Branch rollback failed retriable transaction errors code.
	TransactionErrorCodeBranchRollbackFailedRetriable = TransactionErrorCode(4)

	// TransactionErrorCodeBranchRollbackFailedUnretriable Branch rollback failed unretriable transaction errors code.
	TransactionErrorCodeBranchRollbackFailedUnretriable = TransactionErrorCode(5)

	// TransactionErrorCodeBranchRegisterFailed Branch register failed transaction errors code.
	TransactionErrorCodeBranchRegisterFailed = TransactionErrorCode(6)

	// TransactionErrorCodeBranchReportFailed Branch report failed transaction errors code.
	TransactionErrorCodeBranchReportFailed = TransactionErrorCode(7)

	// TransactionErrorCodeLockableCheckFailed Lockable check failed transaction errors code.
	TransactionErrorCodeLockableCheckFailed = TransactionErrorCode(8)

	// TransactionErrorCodeBranchTransactionNotExist Branch transaction not exist transaction errors code.
	TransactionErrorCodeBranchTransactionNotExist = TransactionErrorCode(9)

	// TransactionErrorCodeGlobalTransactionNotExist Global transaction not exist transaction errors code.
	TransactionErrorCodeGlobalTransactionNotExist = TransactionErrorCode(10)

	// TransactionErrorCodeGlobalTransactionNotActive Global transaction not active transaction errors code.
	TransactionErrorCodeGlobalTransactionNotActive = TransactionErrorCode(11)

	// TransactionErrorCodeGlobalTransactionStatusInvalid Global transaction status invalid transaction errors code.
	TransactionErrorCodeGlobalTransactionStatusInvalid = TransactionErrorCode(12)

	// TransactionErrorCodeFailedToSendBranchCommitRequest Failed to send branch commit request transaction errors code.
	TransactionErrorCodeFailedToSendBranchCommitRequest = TransactionErrorCode(13)

	// TransactionErrorCodeFailedToSendBranchRollbackRequest Failed to send branch rollback request transaction errors code.
	TransactionErrorCodeFailedToSendBranchRollbackRequest = TransactionErrorCode(14)

	// TransactionErrorCodeFailedToAddBranch Failed to add branch transaction errors code.
	TransactionErrorCodeFailedToAddBranch = TransactionErrorCode(15)

	// TransactionErrorCodeFailedLockGlobalTranscation Failed to lock global transaction errors code.
	TransactionErrorCodeFailedLockGlobalTranscation = TransactionErrorCode(16)

	// TransactionErrorCodeFailedWriteSession FailedWriteSession
	TransactionErrorCodeFailedWriteSession = TransactionErrorCode(17)

	// FailedStore Failed to holder errors code
	FailedStore = TransactionErrorCode(18)

	// LockKeyConflictFailFast Lock key conflict fail fast transaction exception code.
	LockKeyConflictFailFast = TransactionErrorCode(19)

	// TccFenceDbDuplicateKeyError Insert tcc fence record duplicate key errors
	TccFenceDbDuplicateKeyError = TransactionErrorCode(20)

	// RollbackFenceError rollback tcc fence error
	RollbackFenceError = TransactionErrorCode(21)

	// CommitFenceError commit tcc fence  error
	CommitFenceError = TransactionErrorCode(22)

	// TccFenceDbError query tcc fence prepare sql failed
	TccFenceDbError = TransactionErrorCode(23)

	// PrepareFenceError prepare tcc fence error
	PrepareFenceError = TransactionErrorCode(24)

	// FenceBusinessError callback business method maybe return this error type
	FenceBusinessError = TransactionErrorCode(26)

	// FencePhaseError have fence phase but is not illegal value
	FencePhaseError = TransactionErrorCode(27)
)

Variables

View Source
var (
	ErrorTooManySessions  = errors.New("too many sessions")
	ErrorHeartBeatTimeOut = errors.New("heart beat time out")
)

Functions

This section is empty.

Types

type TccFenceError

type TccFenceError struct {
	Code    TransactionErrorCode
	Message string
	Parent  error
}

func NewTccFenceError

func NewTccFenceError(code TransactionErrorCode, msg string, parent error) *TccFenceError

func (TccFenceError) Error

func (e TccFenceError) Error() string

type TransactionError

type TransactionError struct {
	Code    byte
	Message string
}

func (TransactionError) Error

func (e TransactionError) Error() string

type TransactionErrorCode

type TransactionErrorCode int32

Jump to

Keyboard shortcuts

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