queryservice

package
v0.13.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_queryservice_proto protoreflect.FileDescriptor
View Source
var Query_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "queryservice.Query",
	HandlerType: (*QueryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Execute",
			Handler:    _Query_Execute_Handler,
		},
		{
			MethodName: "Begin",
			Handler:    _Query_Begin_Handler,
		},
		{
			MethodName: "Commit",
			Handler:    _Query_Commit_Handler,
		},
		{
			MethodName: "Rollback",
			Handler:    _Query_Rollback_Handler,
		},
		{
			MethodName: "Prepare",
			Handler:    _Query_Prepare_Handler,
		},
		{
			MethodName: "CommitPrepared",
			Handler:    _Query_CommitPrepared_Handler,
		},
		{
			MethodName: "RollbackPrepared",
			Handler:    _Query_RollbackPrepared_Handler,
		},
		{
			MethodName: "CreateTransaction",
			Handler:    _Query_CreateTransaction_Handler,
		},
		{
			MethodName: "StartCommit",
			Handler:    _Query_StartCommit_Handler,
		},
		{
			MethodName: "SetRollback",
			Handler:    _Query_SetRollback_Handler,
		},
		{
			MethodName: "ConcludeTransaction",
			Handler:    _Query_ConcludeTransaction_Handler,
		},
		{
			MethodName: "ReadTransaction",
			Handler:    _Query_ReadTransaction_Handler,
		},
		{
			MethodName: "BeginExecute",
			Handler:    _Query_BeginExecute_Handler,
		},
		{
			MethodName: "MessageAck",
			Handler:    _Query_MessageAck_Handler,
		},
		{
			MethodName: "ReserveExecute",
			Handler:    _Query_ReserveExecute_Handler,
		},
		{
			MethodName: "ReserveBeginExecute",
			Handler:    _Query_ReserveBeginExecute_Handler,
		},
		{
			MethodName: "Release",
			Handler:    _Query_Release_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamExecute",
			Handler:       _Query_StreamExecute_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "BeginStreamExecute",
			Handler:       _Query_BeginStreamExecute_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "MessageStream",
			Handler:       _Query_MessageStream_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "ReserveStreamExecute",
			Handler:       _Query_ReserveStreamExecute_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "ReserveBeginStreamExecute",
			Handler:       _Query_ReserveBeginStreamExecute_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "StreamHealth",
			Handler:       _Query_StreamHealth_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "VStream",
			Handler:       _Query_VStream_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "VStreamRows",
			Handler:       _Query_VStreamRows_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "VStreamResults",
			Handler:       _Query_VStreamResults_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "queryservice.proto",
}

Query_ServiceDesc is the grpc.ServiceDesc for Query service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterQueryServer

func RegisterQueryServer(s grpc.ServiceRegistrar, 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)
	// 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)
	// BeginStreamExecute executes a begin and the specified SQL query.
	BeginStreamExecute(ctx context.Context, in *query.BeginStreamExecuteRequest, opts ...grpc.CallOption) (Query_BeginStreamExecuteClient, 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 executes a query on a reserved connection
	ReserveExecute(ctx context.Context, in *query.ReserveExecuteRequest, opts ...grpc.CallOption) (*query.ReserveExecuteResponse, error)
	// ReserveBeginExecute starts a transaction and executes a query in the transaction on a reserved connection
	ReserveBeginExecute(ctx context.Context, in *query.ReserveBeginExecuteRequest, opts ...grpc.CallOption) (*query.ReserveBeginExecuteResponse, error)
	// ReserveStreamExecute executes a streaming query on a reserved connection
	ReserveStreamExecute(ctx context.Context, in *query.ReserveStreamExecuteRequest, opts ...grpc.CallOption) (Query_ReserveStreamExecuteClient, error)
	// ReserveBeginStreamExecute starts a transaction and executes a streaming query in the transaction on a reserved connection
	ReserveBeginStreamExecute(ctx context.Context, in *query.ReserveBeginStreamExecuteRequest, opts ...grpc.CallOption) (Query_ReserveBeginStreamExecuteClient, error)
	// Release releases the connection
	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://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc.ClientConnInterface) 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)
	// 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)
	// BeginStreamExecute executes a begin and the specified SQL query.
	BeginStreamExecute(*query.BeginStreamExecuteRequest, Query_BeginStreamExecuteServer) 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 executes a query on a reserved connection
	ReserveExecute(context.Context, *query.ReserveExecuteRequest) (*query.ReserveExecuteResponse, error)
	// ReserveBeginExecute starts a transaction and executes a query in the transaction on a reserved connection
	ReserveBeginExecute(context.Context, *query.ReserveBeginExecuteRequest) (*query.ReserveBeginExecuteResponse, error)
	// ReserveStreamExecute executes a streaming query on a reserved connection
	ReserveStreamExecute(*query.ReserveStreamExecuteRequest, Query_ReserveStreamExecuteServer) error
	// ReserveBeginStreamExecute starts a transaction and executes a streaming query in the transaction on a reserved connection
	ReserveBeginStreamExecute(*query.ReserveBeginStreamExecuteRequest, Query_ReserveBeginStreamExecuteServer) error
	// Release releases the connection
	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
	// contains filtered or unexported methods
}

QueryServer is the server API for Query service. All implementations must embed UnimplementedQueryServer for forward compatibility

type Query_BeginStreamExecuteClient added in v0.13.0

type Query_BeginStreamExecuteClient interface {
	Recv() (*query.BeginStreamExecuteResponse, error)
	grpc.ClientStream
}

type Query_BeginStreamExecuteServer added in v0.13.0

type Query_BeginStreamExecuteServer interface {
	Send(*query.BeginStreamExecuteResponse) error
	grpc.ServerStream
}

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_ReserveBeginStreamExecuteClient added in v0.13.0

type Query_ReserveBeginStreamExecuteClient interface {
	Recv() (*query.ReserveBeginStreamExecuteResponse, error)
	grpc.ClientStream
}

type Query_ReserveBeginStreamExecuteServer added in v0.13.0

type Query_ReserveBeginStreamExecuteServer interface {
	Send(*query.ReserveBeginStreamExecuteResponse) error
	grpc.ServerStream
}

type Query_ReserveStreamExecuteClient added in v0.13.0

type Query_ReserveStreamExecuteClient interface {
	Recv() (*query.ReserveStreamExecuteResponse, error)
	grpc.ClientStream
}

type Query_ReserveStreamExecuteServer added in v0.13.0

type Query_ReserveStreamExecuteServer interface {
	Send(*query.ReserveStreamExecuteResponse) 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 must be embedded to have forward compatible implementations.

func (UnimplementedQueryServer) Begin

func (UnimplementedQueryServer) BeginStreamExecute added in v0.13.0

func (UnimplementedQueryServer) Commit

func (UnimplementedQueryServer) Execute

func (UnimplementedQueryServer) MessageAck

func (UnimplementedQueryServer) MessageStream

func (UnimplementedQueryServer) Prepare

func (UnimplementedQueryServer) Release

func (UnimplementedQueryServer) ReserveBeginStreamExecute added in v0.13.0

func (UnimplementedQueryServer) ReserveStreamExecute added in v0.13.0

func (UnimplementedQueryServer) Rollback

func (UnimplementedQueryServer) SetRollback

func (UnimplementedQueryServer) StartCommit

func (UnimplementedQueryServer) StreamExecute

func (UnimplementedQueryServer) StreamHealth

func (UnimplementedQueryServer) VStream

func (UnimplementedQueryServer) VStreamRows

type UnsafeQueryServer added in v0.11.0

type UnsafeQueryServer interface {
	// contains filtered or unexported methods
}

UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to QueryServer will result in compilation errors.

Jump to

Keyboard shortcuts

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