Documentation ¶
Overview ¶
Package main wraps the client library in a gRPC interface that a benchmarker can communicate through.
Index ¶
- Constants
- Variables
- func RegisterSpannerBenchWrapperServer(s grpc.ServiceRegistrar, srv SpannerBenchWrapperServer)
- type Album
- type EmptyResponse
- type InsertQuery
- func (*InsertQuery) Descriptor() ([]byte, []int)deprecated
- func (x *InsertQuery) GetAlbums() []*Album
- func (x *InsertQuery) GetSingers() []*Singer
- func (*InsertQuery) ProtoMessage()
- func (x *InsertQuery) ProtoReflect() protoreflect.Message
- func (x *InsertQuery) Reset()
- func (x *InsertQuery) String() string
- type ReadQuery
- type Singer
- func (*Singer) Descriptor() ([]byte, []int)deprecated
- func (x *Singer) GetFirstName() string
- func (x *Singer) GetId() int64
- func (x *Singer) GetLastName() string
- func (x *Singer) GetSingerInfo() string
- func (*Singer) ProtoMessage()
- func (x *Singer) ProtoReflect() protoreflect.Message
- func (x *Singer) Reset()
- func (x *Singer) String() string
- type SpannerBenchWrapperClient
- type SpannerBenchWrapperServer
- type UnimplementedSpannerBenchWrapperServer
- func (UnimplementedSpannerBenchWrapperServer) Insert(context.Context, *InsertQuery) (*EmptyResponse, error)
- func (UnimplementedSpannerBenchWrapperServer) Read(context.Context, *ReadQuery) (*EmptyResponse, error)
- func (UnimplementedSpannerBenchWrapperServer) Update(context.Context, *UpdateQuery) (*EmptyResponse, error)
- type UnsafeSpannerBenchWrapperServer
- type UpdateQuery
Constants ¶
const ( SpannerBenchWrapper_Read_FullMethodName = "/spanner_bench.SpannerBenchWrapper/Read" SpannerBenchWrapper_Insert_FullMethodName = "/spanner_bench.SpannerBenchWrapper/Insert" SpannerBenchWrapper_Update_FullMethodName = "/spanner_bench.SpannerBenchWrapper/Update" )
Variables ¶
var File_spanner_proto protoreflect.FileDescriptor
var SpannerBenchWrapper_ServiceDesc = grpc.ServiceDesc{ ServiceName: "spanner_bench.SpannerBenchWrapper", HandlerType: (*SpannerBenchWrapperServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Read", Handler: _SpannerBenchWrapper_Read_Handler, }, { MethodName: "Insert", Handler: _SpannerBenchWrapper_Insert_Handler, }, { MethodName: "Update", Handler: _SpannerBenchWrapper_Update_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "spanner.proto", }
SpannerBenchWrapper_ServiceDesc is the grpc.ServiceDesc for SpannerBenchWrapper service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSpannerBenchWrapperServer ¶
func RegisterSpannerBenchWrapperServer(s grpc.ServiceRegistrar, srv SpannerBenchWrapperServer)
Types ¶
type Album ¶
type Album struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` SingerId int64 `protobuf:"varint,2,opt,name=singer_id,json=singerId,proto3" json:"singer_id,omitempty"` AlbumTitle string `protobuf:"bytes,3,opt,name=album_title,json=albumTitle,proto3" json:"album_title,omitempty"` // contains filtered or unexported fields }
func (*Album) Descriptor
deprecated
func (*Album) GetAlbumTitle ¶
func (*Album) GetSingerId ¶
func (*Album) ProtoMessage ¶
func (*Album) ProtoMessage()
func (*Album) ProtoReflect ¶
func (x *Album) ProtoReflect() protoreflect.Message
type EmptyResponse ¶
type EmptyResponse struct {
// contains filtered or unexported fields
}
func (*EmptyResponse) Descriptor
deprecated
func (*EmptyResponse) Descriptor() ([]byte, []int)
Deprecated: Use EmptyResponse.ProtoReflect.Descriptor instead.
func (*EmptyResponse) ProtoMessage ¶
func (*EmptyResponse) ProtoMessage()
func (*EmptyResponse) ProtoReflect ¶
func (x *EmptyResponse) ProtoReflect() protoreflect.Message
func (*EmptyResponse) Reset ¶
func (x *EmptyResponse) Reset()
func (*EmptyResponse) String ¶
func (x *EmptyResponse) String() string
type InsertQuery ¶
type InsertQuery struct { // The query to use in the insert call. Singers []*Singer `protobuf:"bytes,1,rep,name=singers,proto3" json:"singers,omitempty"` Albums []*Album `protobuf:"bytes,2,rep,name=albums,proto3" json:"albums,omitempty"` // contains filtered or unexported fields }
func (*InsertQuery) Descriptor
deprecated
func (*InsertQuery) Descriptor() ([]byte, []int)
Deprecated: Use InsertQuery.ProtoReflect.Descriptor instead.
func (*InsertQuery) GetAlbums ¶
func (x *InsertQuery) GetAlbums() []*Album
func (*InsertQuery) GetSingers ¶
func (x *InsertQuery) GetSingers() []*Singer
func (*InsertQuery) ProtoMessage ¶
func (*InsertQuery) ProtoMessage()
func (*InsertQuery) ProtoReflect ¶
func (x *InsertQuery) ProtoReflect() protoreflect.Message
func (*InsertQuery) Reset ¶
func (x *InsertQuery) Reset()
func (*InsertQuery) String ¶
func (x *InsertQuery) String() string
type ReadQuery ¶
type ReadQuery struct { // The query to use in the read call. Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` // contains filtered or unexported fields }
func (*ReadQuery) Descriptor
deprecated
func (*ReadQuery) ProtoMessage ¶
func (*ReadQuery) ProtoMessage()
func (*ReadQuery) ProtoReflect ¶
func (x *ReadQuery) ProtoReflect() protoreflect.Message
type Singer ¶
type Singer struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` FirstName string `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` LastName string `protobuf:"bytes,3,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` SingerInfo string `protobuf:"bytes,4,opt,name=singer_info,json=singerInfo,proto3" json:"singer_info,omitempty"` // contains filtered or unexported fields }
func (*Singer) Descriptor
deprecated
func (*Singer) GetFirstName ¶
func (*Singer) GetLastName ¶
func (*Singer) GetSingerInfo ¶
func (*Singer) ProtoMessage ¶
func (*Singer) ProtoMessage()
func (*Singer) ProtoReflect ¶
func (x *Singer) ProtoReflect() protoreflect.Message
type SpannerBenchWrapperClient ¶
type SpannerBenchWrapperClient interface { // Read represents operations like Go's ReadOnlyTransaction.Query, Java's // ReadOnlyTransaction.executeQuery, Python's snapshot.read, and Node's // Transaction.Read. // // It will typically be used to read many items. Read(ctx context.Context, in *ReadQuery, opts ...grpc.CallOption) (*EmptyResponse, error) // Insert represents operations like Go's Client.Apply, Java's // DatabaseClient.writeAtLeastOnce, Python's transaction.commit, and Node's // Transaction.Commit. // // It will typically be used to insert many items. Insert(ctx context.Context, in *InsertQuery, opts ...grpc.CallOption) (*EmptyResponse, error) // Update represents operations like Go's ReadWriteTransaction.BatchUpdate, // Java's TransactionRunner.run, Python's Batch.update, and Node's // Transaction.BatchUpdate. // // It will typically be used to update many items. Update(ctx context.Context, in *UpdateQuery, opts ...grpc.CallOption) (*EmptyResponse, error) }
SpannerBenchWrapperClient is the client API for SpannerBenchWrapper 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 NewSpannerBenchWrapperClient ¶
func NewSpannerBenchWrapperClient(cc grpc.ClientConnInterface) SpannerBenchWrapperClient
type SpannerBenchWrapperServer ¶
type SpannerBenchWrapperServer interface { // Read represents operations like Go's ReadOnlyTransaction.Query, Java's // ReadOnlyTransaction.executeQuery, Python's snapshot.read, and Node's // Transaction.Read. // // It will typically be used to read many items. Read(context.Context, *ReadQuery) (*EmptyResponse, error) // Insert represents operations like Go's Client.Apply, Java's // DatabaseClient.writeAtLeastOnce, Python's transaction.commit, and Node's // Transaction.Commit. // // It will typically be used to insert many items. Insert(context.Context, *InsertQuery) (*EmptyResponse, error) // Update represents operations like Go's ReadWriteTransaction.BatchUpdate, // Java's TransactionRunner.run, Python's Batch.update, and Node's // Transaction.BatchUpdate. // // It will typically be used to update many items. Update(context.Context, *UpdateQuery) (*EmptyResponse, error) // contains filtered or unexported methods }
SpannerBenchWrapperServer is the server API for SpannerBenchWrapper service. All implementations must embed UnimplementedSpannerBenchWrapperServer for forward compatibility.
type UnimplementedSpannerBenchWrapperServer ¶
type UnimplementedSpannerBenchWrapperServer struct{}
UnimplementedSpannerBenchWrapperServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedSpannerBenchWrapperServer) Insert ¶
func (UnimplementedSpannerBenchWrapperServer) Insert(context.Context, *InsertQuery) (*EmptyResponse, error)
func (UnimplementedSpannerBenchWrapperServer) Read ¶
func (UnimplementedSpannerBenchWrapperServer) Read(context.Context, *ReadQuery) (*EmptyResponse, error)
func (UnimplementedSpannerBenchWrapperServer) Update ¶
func (UnimplementedSpannerBenchWrapperServer) Update(context.Context, *UpdateQuery) (*EmptyResponse, error)
type UnsafeSpannerBenchWrapperServer ¶
type UnsafeSpannerBenchWrapperServer interface {
// contains filtered or unexported methods
}
UnsafeSpannerBenchWrapperServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SpannerBenchWrapperServer will result in compilation errors.
type UpdateQuery ¶
type UpdateQuery struct { // The queries to use in the update call. Queries []string `protobuf:"bytes,1,rep,name=queries,proto3" json:"queries,omitempty"` // contains filtered or unexported fields }
func (*UpdateQuery) Descriptor
deprecated
func (*UpdateQuery) Descriptor() ([]byte, []int)
Deprecated: Use UpdateQuery.ProtoReflect.Descriptor instead.
func (*UpdateQuery) GetQueries ¶
func (x *UpdateQuery) GetQueries() []string
func (*UpdateQuery) ProtoMessage ¶
func (*UpdateQuery) ProtoMessage()
func (*UpdateQuery) ProtoReflect ¶
func (x *UpdateQuery) ProtoReflect() protoreflect.Message
func (*UpdateQuery) Reset ¶
func (x *UpdateQuery) Reset()
func (*UpdateQuery) String ¶
func (x *UpdateQuery) String() string