gorpctabletconn

package
v0.0.0-...-d271c08 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2014 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(context 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(context 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(context 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(context 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(context context.Context, queries []tproto.BoundQuery, transactionID int64) (*tproto.QueryResultList, error)

ExecuteBatch sends a batch query to VTTablet.

func (*TabletBson) Rollback

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

Rollback rolls back the ongoing transaction.

func (*TabletBson) SplitQuery

func (conn *TabletBson) SplitQuery(context 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(context 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