queryservice

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

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

Go to latest
Published: Oct 7, 2015 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package queryservice contains the interface for the service definition of the Query Service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorQueryService

type ErrorQueryService struct {
	GetSessionIdError error
}

ErrorQueryService is an implementation of QueryService that returns a configurable error for some of its methods.

func (*ErrorQueryService) Begin

func (e *ErrorQueryService) Begin(ctx context.Context, target *pb.Target, session *proto.Session, txInfo *proto.TransactionInfo) error

Begin is part of QueryService interface

func (*ErrorQueryService) Commit

func (e *ErrorQueryService) Commit(ctx context.Context, target *pb.Target, session *proto.Session) error

Commit is part of QueryService interface

func (*ErrorQueryService) Execute

func (e *ErrorQueryService) Execute(ctx context.Context, target *pb.Target, query *proto.Query, reply *mproto.QueryResult) error

Execute is part of QueryService interface

func (*ErrorQueryService) ExecuteBatch

func (e *ErrorQueryService) ExecuteBatch(ctx context.Context, target *pb.Target, queryList *proto.QueryList, reply *proto.QueryResultList) error

ExecuteBatch is part of QueryService interface

func (*ErrorQueryService) GetSessionId

func (e *ErrorQueryService) GetSessionId(sessionParams *proto.SessionParams, sessionInfo *proto.SessionInfo) error

GetSessionId is part of QueryService interface

func (*ErrorQueryService) HandlePanic

func (e *ErrorQueryService) HandlePanic(*error)

HandlePanic is part of QueryService interface

func (*ErrorQueryService) Rollback

func (e *ErrorQueryService) Rollback(ctx context.Context, target *pb.Target, session *proto.Session) error

Rollback is part of QueryService interface

func (*ErrorQueryService) SplitQuery

func (e *ErrorQueryService) SplitQuery(ctx context.Context, target *pb.Target, req *proto.SplitQueryRequest, reply *proto.SplitQueryResult) error

SplitQuery is part of QueryService interface

func (*ErrorQueryService) StreamExecute

func (e *ErrorQueryService) StreamExecute(ctx context.Context, target *pb.Target, query *proto.Query, sendReply func(*mproto.QueryResult) error) error

StreamExecute is part of QueryService interface

func (*ErrorQueryService) StreamHealthRegister

func (e *ErrorQueryService) StreamHealthRegister(chan<- *pb.StreamHealthResponse) (int, error)

StreamHealthRegister is part of QueryService interface

func (*ErrorQueryService) StreamHealthUnregister

func (e *ErrorQueryService) StreamHealthUnregister(int) error

StreamHealthUnregister is part of QueryService interface

type QueryService

type QueryService interface {
	// establish a session to survive restart
	GetSessionId(sessionParams *proto.SessionParams, sessionInfo *proto.SessionInfo) error

	// Transaction management
	Begin(ctx context.Context, target *pb.Target, session *proto.Session, txInfo *proto.TransactionInfo) error
	Commit(ctx context.Context, target *pb.Target, session *proto.Session) error
	Rollback(ctx context.Context, target *pb.Target, session *proto.Session) error

	// Query execution
	Execute(ctx context.Context, target *pb.Target, query *proto.Query, reply *mproto.QueryResult) error
	StreamExecute(ctx context.Context, target *pb.Target, query *proto.Query, sendReply func(*mproto.QueryResult) error) error
	ExecuteBatch(ctx context.Context, target *pb.Target, queryList *proto.QueryList, reply *proto.QueryResultList) error

	// Map reduce helper
	SplitQuery(ctx context.Context, target *pb.Target, req *proto.SplitQueryRequest, reply *proto.SplitQueryResult) error

	// StreamHealthRegister registers a listener for StreamHealth
	StreamHealthRegister(chan<- *pb.StreamHealthResponse) (int, error)

	// StreamHealthUnregister unregisters a listener for StreamHealth
	StreamHealthUnregister(int) error

	// Helper for RPC panic handling: call this in a defer statement
	// at the beginning of each RPC handling method.
	HandlePanic(*error)
}

QueryService is the interface implemented by the tablet's query service.

Jump to

Keyboard shortcuts

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