proto

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: GPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchRegister

type BranchRegister struct {
	XID             string
	ResourceID      string
	LockKey         string
	BranchType      api.BranchSession_BranchType
	ApplicationData []byte
}

type BranchResource

type BranchResource interface {
	Commit(ctx context.Context, bs *api.BranchSession) (api.BranchSession_BranchStatus, error)
	Rollback(ctx context.Context, bs *api.BranchSession) (api.BranchSession_BranchStatus, error)
}

type TransactionManager

type TransactionManager interface {
	// Begin return xid
	Begin(ctx context.Context, transactionName string, timeout int32) (string, error)
	Commit(ctx context.Context, xid string) (api.GlobalSession_GlobalStatus, error)
	Rollback(ctx context.Context, xid string) (api.GlobalSession_GlobalStatus, error)
	BranchRegister(ctx context.Context, in *BranchRegister) (string, int64, error)
	BranchReport(ctx context.Context, branchID string, status api.BranchSession_BranchStatus) error
	ReleaseLockKeys(ctx context.Context, resourceID string, lockKeys []string) (bool, error)
	IsLockable(ctx context.Context, resourceID, lockKey string) (bool, error)
	IsLockableWithXID(ctx context.Context, resourceID, lockKey, xid string) (bool, error)
}

Jump to

Keyboard shortcuts

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