gorpctabletconn

package
v0.0.0-...-2166858 Latest Latest
Warning

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

Go to latest
Published: May 28, 2016 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialTablet

func DialTablet(ctx context.Context, endPoint topo.EndPoint, keyspace, shard string, timeout time.Duration) (tabletconn.TabletConn, error)

DialTablet creates and initializes TabletBson.

Types

type TabletBson

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

TabletBson implements a bson rpcplus implementation for TabletConn

func (*TabletBson) Begin

func (conn *TabletBson) Begin(ctx context.Context) (transactionID int64, err error)

Begin starts a transaction.

func (*TabletBson) Close

func (conn *TabletBson) Close()

Close closes underlying bsonrpc.

func (*TabletBson) Commit

func (conn *TabletBson) Commit(ctx context.Context, transactionID int64) error

Commit commits the ongoing transaction.

func (*TabletBson) EndPoint

func (conn *TabletBson) EndPoint() topo.EndPoint

EndPoint returns the rpc end point.

func (*TabletBson) Execute

func (conn *TabletBson) Execute(ctx context.Context, query string, bindVars map[string]interface{}, transactionID int64) (*mproto.QueryResult, error)

Execute sends the query to VTTablet.

func (*TabletBson) ExecuteBatch

func (conn *TabletBson) ExecuteBatch(ctx context.Context, queries []tproto.BoundQuery, transactionID int64) (*tproto.QueryResultList, error)

ExecuteBatch sends a batch query to VTTablet.

func (*TabletBson) Rollback

func (conn *TabletBson) Rollback(ctx context.Context, transactionID int64) error

Rollback rolls back the ongoing transaction.

func (*TabletBson) SplitQuery

func (conn *TabletBson) SplitQuery(ctx context.Context, query tproto.BoundQuery, splitCount int) (queries []tproto.QuerySplit, err error)

SplitQuery is the stub for SqlQuery.SplitQuery RPC

func (*TabletBson) StreamExecute

func (conn *TabletBson) StreamExecute(ctx context.Context, query string, bindVars map[string]interface{}, transactionID int64) (<-chan *mproto.QueryResult, tabletconn.ErrFunc, error)

StreamExecute starts a streaming query to VTTablet.

Jump to

Keyboard shortcuts

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