fakerpcvtgateconn

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Overview

Package fakerpcvtgateconn provides a fake implementation of vtgateconn.Impl that doesn't do any RPC, but uses a local map to return results.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeVTGateConn

type FakeVTGateConn struct {
	// contains filtered or unexported fields
}

FakeVTGateConn provides a fake implementation of vtgateconn.Impl

func RegisterFakeVTGateConnDialer

func RegisterFakeVTGateConnDialer() (*FakeVTGateConn, string)

RegisterFakeVTGateConnDialer registers the proper dialer for this fake, and returns the underlying instance that will be returned by the dialer, and the protocol to use to get this fake.

func (*FakeVTGateConn) AddQuery

func (conn *FakeVTGateConn) AddQuery(
	sql string,
	bindVariables map[string]*querypb.BindVariable,
	session *vtgatepb.Session,
	expectedResult *sqltypes.Result)

AddQuery adds a query and expected result.

func (*FakeVTGateConn) Close

func (conn *FakeVTGateConn) Close()

Close please see vtgateconn.Impl.Close

func (*FakeVTGateConn) CloseSession added in v0.11.0

func (conn *FakeVTGateConn) CloseSession(ctx context.Context, session *vtgatepb.Session) error

CloseSession please see vtgateconn.Impl.CloseSession

func (*FakeVTGateConn) Execute

func (conn *FakeVTGateConn) Execute(ctx context.Context, session *vtgatepb.Session, sql string, bindVars map[string]*querypb.BindVariable) (*vtgatepb.Session, *sqltypes.Result, error)

Execute please see vtgateconn.Impl.Execute

func (*FakeVTGateConn) ExecuteBatch

func (conn *FakeVTGateConn) ExecuteBatch(ctx context.Context, session *vtgatepb.Session, sqlList []string, bindVarsList []map[string]*querypb.BindVariable) (*vtgatepb.Session, []sqltypes.QueryResponse, error)

ExecuteBatch please see vtgateconn.Impl.ExecuteBatch

func (*FakeVTGateConn) Prepare added in v0.11.0

func (conn *FakeVTGateConn) Prepare(ctx context.Context, session *vtgatepb.Session, sql string, bindVars map[string]*querypb.BindVariable) (*vtgatepb.Session, []*querypb.Field, error)

Prepare please see vtgateconn.Impl.Prepare

func (*FakeVTGateConn) ResolveTransaction

func (conn *FakeVTGateConn) ResolveTransaction(ctx context.Context, dtid string) error

ResolveTransaction please see vtgateconn.Impl.ResolveTransaction

func (*FakeVTGateConn) StreamExecute

func (conn *FakeVTGateConn) StreamExecute(ctx context.Context, session *vtgatepb.Session, sql string, bindVars map[string]*querypb.BindVariable) (sqltypes.ResultStream, error)

StreamExecute please see vtgateconn.Impl.StreamExecute

func (*FakeVTGateConn) VStream

VStream streams binlog events.

Jump to

Keyboard shortcuts

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