gorpctabletconn

package
v2.0.0-alpha1+incompat... Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2015 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialTablet

func DialTablet(ctx context.Context, endPoint *pbt.EndPoint, keyspace, shard string, tabletType pbt.TabletType, 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) Begin2

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

Begin2 should not be used for anything except tests for now; it will eventually replace the existing Begin. Begin2 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) Commit2

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

Commit2 should not be used for anything except tests for now; it will eventually replace the existing Commit. Commit2 commits the ongoing transaction.

func (*TabletBson) EndPoint

func (conn *TabletBson) EndPoint() *pbt.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) Execute2

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

Execute2 should not be used now other than in tests. It is the CallerID enabled version of Execute Execute2 sends to query to VTTablet

func (*TabletBson) ExecuteBatch

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

ExecuteBatch sends a batch query to VTTablet.

func (*TabletBson) ExecuteBatch2

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

ExecuteBatch2 should not be used now other than in tests. It is the CallerID enabled version of ExecuteBatch ExecuteBatch2 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) Rollback2

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

Rollback2 should not be used for anything except tests for now; it will eventually replace the existing Rollback. Rollback2 rolls back the ongoing transaction.

func (*TabletBson) SetTarget

func (conn *TabletBson) SetTarget(keyspace, shard string, tabletType pbt.TabletType) error

SetTarget can be called to change the target used for subsequent calls.

func (*TabletBson) SplitQuery

func (conn *TabletBson) SplitQuery(ctx context.Context, query tproto.BoundQuery, splitColumn string, 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.

func (*TabletBson) StreamExecute2

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

StreamExecute2 starts a streaming query to VTTablet. This differs from StreamExecute in that it expects errors to be returned as part of the StreamExecute results.

func (*TabletBson) StreamHealth

func (conn *TabletBson) StreamHealth(ctx context.Context) (<-chan *pb.StreamHealthResponse, tabletconn.ErrFunc, error)

StreamHealth is the stub for SqlQuery.StreamHealth RPC

Jump to

Keyboard shortcuts

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