spanner_bench

package
v1.56.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README

Regenerating protos

cd spanner/internal/benchwrapper/proto
protoc --go_out=plugins=grpc:. *.proto

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_spanner_proto protoreflect.FileDescriptor
View Source
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 added in v1.26.0

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 added in v1.26.0

func (*Album) Descriptor() ([]byte, []int)

Deprecated: Use Album.ProtoReflect.Descriptor instead.

func (*Album) GetAlbumTitle added in v1.26.0

func (x *Album) GetAlbumTitle() string

func (*Album) GetId added in v1.26.0

func (x *Album) GetId() int64

func (*Album) GetSingerId added in v1.26.0

func (x *Album) GetSingerId() int64

func (*Album) ProtoMessage added in v1.26.0

func (*Album) ProtoMessage()

func (*Album) ProtoReflect added in v1.26.0

func (x *Album) ProtoReflect() protoreflect.Message

func (*Album) Reset added in v1.26.0

func (x *Album) Reset()

func (*Album) String added in v1.26.0

func (x *Album) String() string

type EmptyResponse

type EmptyResponse struct {
	// contains filtered or unexported fields
}

TODO(deklerk): Replace with Google's canonical Empty.

func (*EmptyResponse) Descriptor deprecated

func (*EmptyResponse) Descriptor() ([]byte, []int)

Deprecated: Use EmptyResponse.ProtoReflect.Descriptor instead.

func (*EmptyResponse) ProtoMessage

func (*EmptyResponse) ProtoMessage()

func (*EmptyResponse) ProtoReflect added in v1.26.0

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 added in v1.26.0

func (x *InsertQuery) GetAlbums() []*Album

func (*InsertQuery) GetSingers added in v1.26.0

func (x *InsertQuery) GetSingers() []*Singer

func (*InsertQuery) ProtoMessage

func (*InsertQuery) ProtoMessage()

func (*InsertQuery) ProtoReflect added in v1.26.0

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) Descriptor() ([]byte, []int)

Deprecated: Use ReadQuery.ProtoReflect.Descriptor instead.

func (*ReadQuery) GetQuery

func (x *ReadQuery) GetQuery() string

func (*ReadQuery) ProtoMessage

func (*ReadQuery) ProtoMessage()

func (*ReadQuery) ProtoReflect added in v1.26.0

func (x *ReadQuery) ProtoReflect() protoreflect.Message

func (*ReadQuery) Reset

func (x *ReadQuery) Reset()

func (*ReadQuery) String

func (x *ReadQuery) String() string

type Singer added in v1.26.0

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 added in v1.26.0

func (*Singer) Descriptor() ([]byte, []int)

Deprecated: Use Singer.ProtoReflect.Descriptor instead.

func (*Singer) GetFirstName added in v1.26.0

func (x *Singer) GetFirstName() string

func (*Singer) GetId added in v1.26.0

func (x *Singer) GetId() int64

func (*Singer) GetLastName added in v1.26.0

func (x *Singer) GetLastName() string

func (*Singer) GetSingerInfo added in v1.26.0

func (x *Singer) GetSingerInfo() string

func (*Singer) ProtoMessage added in v1.26.0

func (*Singer) ProtoMessage()

func (*Singer) ProtoReflect added in v1.26.0

func (x *Singer) ProtoReflect() protoreflect.Message

func (*Singer) Reset added in v1.26.0

func (x *Singer) Reset()

func (*Singer) String added in v1.26.0

func (x *Singer) String() string

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.

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.

func (UnimplementedSpannerBenchWrapperServer) Insert

func (UnimplementedSpannerBenchWrapperServer) Read

func (UnimplementedSpannerBenchWrapperServer) Update

type UnsafeSpannerBenchWrapperServer added in v1.26.0

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 added in v1.26.0

func (x *UpdateQuery) ProtoReflect() protoreflect.Message

func (*UpdateQuery) Reset

func (x *UpdateQuery) Reset()

func (*UpdateQuery) String

func (x *UpdateQuery) String() string

Jump to

Keyboard shortcuts

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