queryservice

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterQueryServer

func RegisterQueryServer(s *grpc.Server, srv QueryServer)

Types

type QueryClient

type QueryClient interface {
	// Execute executes the specified SQL query (might be in a
	// transaction context, if Query.transaction_id is set).
	Execute(ctx context.Context, in *query.ExecuteRequest, opts ...grpc.CallOption) (*query.ExecuteResponse, error)
	// ExecuteBatch executes a list of queries, and returns the result
	// for each query.
	ExecuteBatch(ctx context.Context, in *query.ExecuteBatchRequest, opts ...grpc.CallOption) (*query.ExecuteBatchResponse, error)
	// StreamExecute executes a streaming query. Use this method if the
	// query returns a large number of rows. The first QueryResult will
	// contain the Fields, subsequent QueryResult messages will contain
	// the rows.
	StreamExecute(ctx context.Context, in *query.StreamExecuteRequest, opts ...grpc.CallOption) (Query_StreamExecuteClient, error)
	// Begin a transaction.
	Begin(ctx context.Context, in *query.BeginRequest, opts ...grpc.CallOption) (*query.BeginResponse, error)
	// Commit a transaction.
	Commit(ctx context.Context, in *query.CommitRequest, opts ...grpc.CallOption) (*query.CommitResponse, error)
	// Rollback a transaction.
	Rollback(ctx context.Context, in *query.RollbackRequest, opts ...grpc.CallOption) (*query.RollbackResponse, error)
	// Prepare preares a transaction.
	Prepare(ctx context.Context, in *query.PrepareRequest, opts ...grpc.CallOption) (*query.PrepareResponse, error)
	// CommitPrepared commits a prepared transaction.
	CommitPrepared(ctx context.Context, in *query.CommitPreparedRequest, opts ...grpc.CallOption) (*query.CommitPreparedResponse, error)
	// RollbackPrepared rolls back a prepared transaction.
	RollbackPrepared(ctx context.Context, in *query.RollbackPreparedRequest, opts ...grpc.CallOption) (*query.RollbackPreparedResponse, error)
	// CreateTransaction creates the metadata for a 2pc transaction.
	CreateTransaction(ctx context.Context, in *query.CreateTransactionRequest, opts ...grpc.CallOption) (*query.CreateTransactionResponse, error)
	// StartCommit initiates a commit for a 2pc transaction.
	StartCommit(ctx context.Context, in *query.StartCommitRequest, opts ...grpc.CallOption) (*query.StartCommitResponse, error)
	// SetRollback marks the 2pc transaction for rollback.
	SetRollback(ctx context.Context, in *query.SetRollbackRequest, opts ...grpc.CallOption) (*query.SetRollbackResponse, error)
	// ConcludeTransaction marks the 2pc transaction as resolved.
	ConcludeTransaction(ctx context.Context, in *query.ConcludeTransactionRequest, opts ...grpc.CallOption) (*query.ConcludeTransactionResponse, error)
	// ReadTransaction returns the 2pc transaction info.
	ReadTransaction(ctx context.Context, in *query.ReadTransactionRequest, opts ...grpc.CallOption) (*query.ReadTransactionResponse, error)
	// BeginExecute executes a begin and the specified SQL query.
	BeginExecute(ctx context.Context, in *query.BeginExecuteRequest, opts ...grpc.CallOption) (*query.BeginExecuteResponse, error)
	// BeginExecuteBatch executes a begin and a list of queries.
	BeginExecuteBatch(ctx context.Context, in *query.BeginExecuteBatchRequest, opts ...grpc.CallOption) (*query.BeginExecuteBatchResponse, error)
	// MessageStream streams messages from a message table.
	MessageStream(ctx context.Context, in *query.MessageStreamRequest, opts ...grpc.CallOption) (Query_MessageStreamClient, error)
	// MessageAck acks messages for a table.
	MessageAck(ctx context.Context, in *query.MessageAckRequest, opts ...grpc.CallOption) (*query.MessageAckResponse, error)
	ReserveExecute(ctx context.Context, in *query.ReserveExecuteRequest, opts ...grpc.CallOption) (*query.ReserveExecuteResponse, error)
	ReserveBeginExecute(ctx context.Context, in *query.ReserveBeginExecuteRequest, opts ...grpc.CallOption) (*query.ReserveBeginExecuteResponse, error)
	Release(ctx context.Context, in *query.ReleaseRequest, opts ...grpc.CallOption) (*query.ReleaseResponse, error)
	// StreamHealth runs a streaming RPC to the tablet, that returns the
	// current health of the tablet on a regular basis.
	StreamHealth(ctx context.Context, in *query.StreamHealthRequest, opts ...grpc.CallOption) (Query_StreamHealthClient, error)
	// VStream streams vreplication events.
	VStream(ctx context.Context, in *binlogdata.VStreamRequest, opts ...grpc.CallOption) (Query_VStreamClient, error)
	// VStreamRows streams rows from the specified starting point.
	VStreamRows(ctx context.Context, in *binlogdata.VStreamRowsRequest, opts ...grpc.CallOption) (Query_VStreamRowsClient, error)
	// VStreamResults streams results along with the gtid of the snapshot.
	VStreamResults(ctx context.Context, in *binlogdata.VStreamResultsRequest, opts ...grpc.CallOption) (Query_VStreamResultsClient, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc *grpc.ClientConn) QueryClient

type QueryServer

type QueryServer interface {
	// Execute executes the specified SQL query (might be in a
	// transaction context, if Query.transaction_id is set).
	Execute(context.Context, *query.ExecuteRequest) (*query.ExecuteResponse, error)
	// ExecuteBatch executes a list of queries, and returns the result
	// for each query.
	ExecuteBatch(context.Context, *query.ExecuteBatchRequest) (*query.ExecuteBatchResponse, error)
	// StreamExecute executes a streaming query. Use this method if the
	// query returns a large number of rows. The first QueryResult will
	// contain the Fields, subsequent QueryResult messages will contain
	// the rows.
	StreamExecute(*query.StreamExecuteRequest, Query_StreamExecuteServer) error
	// Begin a transaction.
	Begin(context.Context, *query.BeginRequest) (*query.BeginResponse, error)
	// Commit a transaction.
	Commit(context.Context, *query.CommitRequest) (*query.CommitResponse, error)
	// Rollback a transaction.
	Rollback(context.Context, *query.RollbackRequest) (*query.RollbackResponse, error)
	// Prepare preares a transaction.
	Prepare(context.Context, *query.PrepareRequest) (*query.PrepareResponse, error)
	// CommitPrepared commits a prepared transaction.
	CommitPrepared(context.Context, *query.CommitPreparedRequest) (*query.CommitPreparedResponse, error)
	// RollbackPrepared rolls back a prepared transaction.
	RollbackPrepared(context.Context, *query.RollbackPreparedRequest) (*query.RollbackPreparedResponse, error)
	// CreateTransaction creates the metadata for a 2pc transaction.
	CreateTransaction(context.Context, *query.CreateTransactionRequest) (*query.CreateTransactionResponse, error)
	// StartCommit initiates a commit for a 2pc transaction.
	StartCommit(context.Context, *query.StartCommitRequest) (*query.StartCommitResponse, error)
	// SetRollback marks the 2pc transaction for rollback.
	SetRollback(context.Context, *query.SetRollbackRequest) (*query.SetRollbackResponse, error)
	// ConcludeTransaction marks the 2pc transaction as resolved.
	ConcludeTransaction(context.Context, *query.ConcludeTransactionRequest) (*query.ConcludeTransactionResponse, error)
	// ReadTransaction returns the 2pc transaction info.
	ReadTransaction(context.Context, *query.ReadTransactionRequest) (*query.ReadTransactionResponse, error)
	// BeginExecute executes a begin and the specified SQL query.
	BeginExecute(context.Context, *query.BeginExecuteRequest) (*query.BeginExecuteResponse, error)
	// BeginExecuteBatch executes a begin and a list of queries.
	BeginExecuteBatch(context.Context, *query.BeginExecuteBatchRequest) (*query.BeginExecuteBatchResponse, error)
	// MessageStream streams messages from a message table.
	MessageStream(*query.MessageStreamRequest, Query_MessageStreamServer) error
	// MessageAck acks messages for a table.
	MessageAck(context.Context, *query.MessageAckRequest) (*query.MessageAckResponse, error)
	ReserveExecute(context.Context, *query.ReserveExecuteRequest) (*query.ReserveExecuteResponse, error)
	ReserveBeginExecute(context.Context, *query.ReserveBeginExecuteRequest) (*query.ReserveBeginExecuteResponse, error)
	Release(context.Context, *query.ReleaseRequest) (*query.ReleaseResponse, error)
	// StreamHealth runs a streaming RPC to the tablet, that returns the
	// current health of the tablet on a regular basis.
	StreamHealth(*query.StreamHealthRequest, Query_StreamHealthServer) error
	// VStream streams vreplication events.
	VStream(*binlogdata.VStreamRequest, Query_VStreamServer) error
	// VStreamRows streams rows from the specified starting point.
	VStreamRows(*binlogdata.VStreamRowsRequest, Query_VStreamRowsServer) error
	// VStreamResults streams results along with the gtid of the snapshot.
	VStreamResults(*binlogdata.VStreamResultsRequest, Query_VStreamResultsServer) error
}

QueryServer is the server API for Query service.

type Query_MessageStreamClient

type Query_MessageStreamClient interface {
	Recv() (*query.MessageStreamResponse, error)
	grpc.ClientStream
}

type Query_MessageStreamServer

type Query_MessageStreamServer interface {
	Send(*query.MessageStreamResponse) error
	grpc.ServerStream
}

type Query_StreamExecuteClient

type Query_StreamExecuteClient interface {
	Recv() (*query.StreamExecuteResponse, error)
	grpc.ClientStream
}

type Query_StreamExecuteServer

type Query_StreamExecuteServer interface {
	Send(*query.StreamExecuteResponse) error
	grpc.ServerStream
}

type Query_StreamHealthClient

type Query_StreamHealthClient interface {
	Recv() (*query.StreamHealthResponse, error)
	grpc.ClientStream
}

type Query_StreamHealthServer

type Query_StreamHealthServer interface {
	Send(*query.StreamHealthResponse) error
	grpc.ServerStream
}

type Query_VStreamClient

type Query_VStreamClient interface {
	Recv() (*binlogdata.VStreamResponse, error)
	grpc.ClientStream
}

type Query_VStreamResultsClient

type Query_VStreamResultsClient interface {
	Recv() (*binlogdata.VStreamResultsResponse, error)
	grpc.ClientStream
}

type Query_VStreamResultsServer

type Query_VStreamResultsServer interface {
	Send(*binlogdata.VStreamResultsResponse) error
	grpc.ServerStream
}

type Query_VStreamRowsClient

type Query_VStreamRowsClient interface {
	Recv() (*binlogdata.VStreamRowsResponse, error)
	grpc.ClientStream
}

type Query_VStreamRowsServer

type Query_VStreamRowsServer interface {
	Send(*binlogdata.VStreamRowsResponse) error
	grpc.ServerStream
}

type Query_VStreamServer

type Query_VStreamServer interface {
	Send(*binlogdata.VStreamResponse) error
	grpc.ServerStream
}

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Begin

func (*UnimplementedQueryServer) BeginExecute

func (*UnimplementedQueryServer) BeginExecuteBatch

func (*UnimplementedQueryServer) Commit

func (*UnimplementedQueryServer) CommitPrepared

func (*UnimplementedQueryServer) ConcludeTransaction

func (*UnimplementedQueryServer) CreateTransaction

func (*UnimplementedQueryServer) Execute

func (*UnimplementedQueryServer) ExecuteBatch

func (*UnimplementedQueryServer) MessageAck

func (*UnimplementedQueryServer) MessageStream

func (*UnimplementedQueryServer) Prepare

func (*UnimplementedQueryServer) ReadTransaction

func (*UnimplementedQueryServer) Release

func (*UnimplementedQueryServer) ReserveBeginExecute

func (*UnimplementedQueryServer) ReserveExecute

func (*UnimplementedQueryServer) Rollback

func (*UnimplementedQueryServer) RollbackPrepared

func (*UnimplementedQueryServer) SetRollback

func (*UnimplementedQueryServer) StartCommit

func (*UnimplementedQueryServer) StreamExecute

func (*UnimplementedQueryServer) StreamHealth

func (*UnimplementedQueryServer) VStream

func (*UnimplementedQueryServer) VStreamResults

func (*UnimplementedQueryServer) VStreamRows

Jump to

Keyboard shortcuts

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