context

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KEY_XID                  = "TX_XID"
	KEY_XID_INTERCEPTOR_TYPE = "tx-xid-interceptor-type"
	KEY_GLOBAL_LOCK_FLAG     = "TX_LOCK"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BusinessActionContext

type BusinessActionContext struct {
	*RootContext
	XID           string
	BranchID      string
	ActionName    string
	ActionContext map[string]interface{}
}

type RootContext

type RootContext struct {
	context.Context
	// contains filtered or unexported fields
}

func NewRootContext

func NewRootContext(ctx context.Context) *RootContext

func (*RootContext) Bind

func (c *RootContext) Bind(xid string)

func (*RootContext) BindGlobalLockFlag

func (c *RootContext) BindGlobalLockFlag()

func (*RootContext) BindInterceptorType

func (c *RootContext) BindInterceptorType(xidType string)

func (*RootContext) BindInterceptorTypeWithBranchType

func (c *RootContext) BindInterceptorTypeWithBranchType(xid string, branchType meta.BranchType)

func (*RootContext) Get

func (c *RootContext) Get(key string) (value interface{}, exists bool)

func (*RootContext) GetXID

func (c *RootContext) GetXID() string

func (*RootContext) GetXIDInterceptorType

func (c *RootContext) GetXIDInterceptorType() string

func (*RootContext) InGlobalTransaction

func (c *RootContext) InGlobalTransaction() bool

func (*RootContext) RequireGlobalLock

func (c *RootContext) RequireGlobalLock() bool

func (*RootContext) Set

func (c *RootContext) Set(key string, value interface{})

func (*RootContext) Unbind

func (c *RootContext) Unbind() string

func (*RootContext) UnbindGlobalLockFlag

func (c *RootContext) UnbindGlobalLockFlag()

func (*RootContext) UnbindInterceptorType

func (c *RootContext) UnbindInterceptorType() string

Jump to

Keyboard shortcuts

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