Documentation ¶
Overview ¶
Package mock is just for test only.
Index ¶
- type Context
- func (c *Context) ActivePendingTxn() error
- func (c *Context) Cancel()
- func (c *Context) ClearValue(key fmt.Stringer)
- func (c *Context) GetClient() kv.Client
- func (c *Context) GetGlobalSysVar(ctx context.Context, name string) (string, error)
- func (c *Context) GetSessionManager() util.SessionManager
- func (c *Context) GetSessionVars() *variable.SessionVars
- func (c *Context) GetStore() kv.Storage
- func (c *Context) GoCtx() goctx.Context
- func (c *Context) InitTxnWithStartTS(startTS uint64) error
- func (c *Context) NewTxn() error
- func (c *Context) RefreshTxnCtx() error
- func (c *Context) SetGlobalSysVar(ctx context.Context, name string, value string) error
- func (c *Context) SetSessionManager(sm util.SessionManager)
- func (c *Context) SetValue(key fmt.Stringer, value interface{})
- func (c *Context) Txn() kv.Transaction
- func (c *Context) Value(key fmt.Stringer) interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Store kv.Storage // mock global variable // contains filtered or unexported fields }
Context represents mocked context.Context.
func (*Context) ActivePendingTxn ¶
ActivePendingTxn implements the context.Context interface.
func (*Context) ClearValue ¶
ClearValue implements context.Context ClearValue interface.
func (*Context) GetGlobalSysVar ¶
GetGlobalSysVar implements GlobalVarAccessor GetGlobalSysVar interface.
func (*Context) GetSessionManager ¶
func (c *Context) GetSessionManager() util.SessionManager
GetSessionManager implements the context.Context interface.
func (*Context) GetSessionVars ¶
func (c *Context) GetSessionVars() *variable.SessionVars
GetSessionVars implements the context.Context GetSessionVars interface.
func (*Context) InitTxnWithStartTS ¶
InitTxnWithStartTS implements the context.Context interface with startTS.
func (*Context) RefreshTxnCtx ¶
RefreshTxnCtx implements the context.Context interface.
func (*Context) SetGlobalSysVar ¶
SetGlobalSysVar implements GlobalVarAccessor SetGlobalSysVar interface.
func (*Context) SetSessionManager ¶
func (c *Context) SetSessionManager(sm util.SessionManager)
SetSessionManager set the session manager.
func (*Context) Txn ¶
func (c *Context) Txn() kv.Transaction
Txn implements context.Context Txn interface.