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 ¶
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.