mock

package
v0.0.0-...-40faf7d Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package mock is just for test only.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Store kv.Storage
	// contains filtered or unexported fields
}

Context represents mocked context.Context.

func NewContext

func NewContext() *Context

NewContext creates a new mocked context.Context.

func (*Context) ClearValue

func (c *Context) ClearValue(key fmt.Stringer)

ClearValue implements context.Context ClearValue interface.

func (*Context) CommitTxn

func (c *Context) CommitTxn() error

CommitTxn implements context.Context CommitTxn interface.

func (*Context) GetClient

func (c *Context) GetClient() kv.Client

GetClient implements context.Context GetClient interface.

func (*Context) GetGlobalSysVar

func (c *Context) GetGlobalSysVar(ctx context.Context, name string) (string, error)

GetGlobalSysVar implements GlobalVarAccessor GetGlobalSysVar interface.

func (*Context) GetSessionVars

func (c *Context) GetSessionVars() *variable.SessionVars

GetSessionVars implements the context.Context GetSessionVars interface.

func (*Context) GetTxn

func (c *Context) GetTxn(forceNew bool) (kv.Transaction, error)

GetTxn implements context.Context GetTxn interface.

func (*Context) RollbackTxn

func (c *Context) RollbackTxn() error

RollbackTxn implements context.Context RollbackTxn interface.

func (*Context) SetGlobalSysVar

func (c *Context) SetGlobalSysVar(ctx context.Context, name string, value string) error

SetGlobalSysVar implements GlobalVarAccessor SetGlobalSysVar interface.

func (*Context) SetValue

func (c *Context) SetValue(key fmt.Stringer, value interface{})

SetValue implements context.Context SetValue interface.

func (*Context) Value

func (c *Context) Value(key fmt.Stringer) interface{}

Value implements context.Context Value interface.

Jump to

Keyboard shortcuts

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