proto

package
v0.0.0-...-7c5168d Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2013 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAuthenticated

func RegisterAuthenticated(vtgate VTGate)

RegisterAuthenticated registers the server.

Types

type BatchQueryShard

type BatchQueryShard struct {
	Queries   []BoundQuery
	SessionId int64
	Keyspace  string
	Shards    []string
}

func (*BatchQueryShard) MarshalBson

func (bqs *BatchQueryShard) MarshalBson(buf *bytes2.ChunkedWriter)

func (*BatchQueryShard) UnmarshalBson

func (bqs *BatchQueryShard) UnmarshalBson(buf *bytes.Buffer)

type BoundQuery

type BoundQuery struct {
	Sql           string
	BindVariables map[string]interface{}
}

func (*BoundQuery) MarshalBson

func (bdq *BoundQuery) MarshalBson(buf *bytes2.ChunkedWriter)

func (*BoundQuery) UnmarshalBson

func (bdq *BoundQuery) UnmarshalBson(buf *bytes.Buffer)

type QueryShard

type QueryShard struct {
	Sql           string
	BindVariables map[string]interface{}
	SessionId     int64
	Keyspace      string
	Shards        []string
}

func (*QueryShard) MarshalBson

func (qrs *QueryShard) MarshalBson(buf *bytes2.ChunkedWriter)

func (*QueryShard) UnmarshalBson

func (qrs *QueryShard) UnmarshalBson(buf *bytes.Buffer)

type Session

type Session struct {
	SessionId int64
}

func (*Session) MarshalBson

func (session *Session) MarshalBson(buf *bytes2.ChunkedWriter)

func (*Session) UnmarshalBson

func (session *Session) UnmarshalBson(buf *bytes.Buffer)

type SessionParams

type SessionParams struct {
	TabletType topo.TabletType
}

func (*SessionParams) MarshalBson

func (spm *SessionParams) MarshalBson(buf *bytes2.ChunkedWriter)

func (*SessionParams) UnmarshalBson

func (spm *SessionParams) UnmarshalBson(buf *bytes.Buffer)

type VTGate

type VTGate interface {
	GetSessionId(sessionParams *SessionParams, session *Session) error
	ExecuteShard(context *rpcproto.Context, query *QueryShard, reply *mproto.QueryResult) error
	ExecuteBatchShard(context *rpcproto.Context, batchQuery *BatchQueryShard, reply *tproto.QueryResultList) error
	StreamExecuteShard(context *rpcproto.Context, query *QueryShard, sendReply func(interface{}) error) error
	Begin(context *rpcproto.Context, session *Session, noOutput *string) error
	Commit(context *rpcproto.Context, session *Session, noOutput *string) error
	Rollback(context *rpcproto.Context, session *Session, noOutput *string) error
	CloseSession(context *rpcproto.Context, session *Session, noOutput *string) error
}

VTGate defines the interface for the rpc service.

Jump to

Keyboard shortcuts

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