mockserver

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Addr string

	// Any unimplemented methods will cause a panic when called.
	btpb.BigtableServer

	// ReadRowsFn mocks ReadRows.
	ReadRowsFn func(*btpb.ReadRowsRequest, btpb.Bigtable_ReadRowsServer) error
	// SampleRowKeysFn mocks SampleRowKeys.
	SampleRowKeysFn func(*btpb.SampleRowKeysRequest, btpb.Bigtable_SampleRowKeysServer) error
	// MutateRowFn mocks MutateRow.
	MutateRowFn func(context.Context, *btpb.MutateRowRequest) (*btpb.MutateRowResponse, error)
	// MutateRowsFn mocks MutateRows.
	MutateRowsFn func(*btpb.MutateRowsRequest, btpb.Bigtable_MutateRowsServer) error
	// CheckAndMutateRowFn mocks CheckAndMutateRow.
	CheckAndMutateRowFn func(context.Context, *btpb.CheckAndMutateRowRequest) (*btpb.CheckAndMutateRowResponse, error)
	// PingAndWarmFn mocks PingAndWarm.
	PingAndWarmFn func(context.Context, *btpb.PingAndWarmRequest) (*btpb.PingAndWarmResponse, error)
	// ReadModifyWriteRowFn mocks ReadModifyWriteRow.
	ReadModifyWriteRowFn func(context.Context, *btpb.ReadModifyWriteRowRequest) (*btpb.ReadModifyWriteRowResponse, error)
	// contains filtered or unexported fields
}

Server is an in-memory Cloud Bigtable fake. It is unauthenticated, and only a rough approximation.

func NewServer

func NewServer(laddr string, opt ...grpc.ServerOption) (*Server, error)

NewServer creates a new Server. The Server will be listening for gRPC connections, without TLS, on the provided address. The resolved address is named by the Addr field.

func (*Server) CheckAndMutateRow

CheckAndMutateRow implements CheckAndMutateRow of the BigtableServer interface.

func (*Server) Close

func (s *Server) Close() error

Close closes the server.

func (*Server) MutateRow

func (s *Server) MutateRow(ctx context.Context, req *btpb.MutateRowRequest) (*btpb.MutateRowResponse, error)

MutateRow implements MutateRow of the BigtableServer interface.

func (*Server) MutateRows

MutateRows implements MutateRows of the BigtableServer interface.

func (*Server) PingAndWarm added in v1.15.0

PingAndWarm implements PingAndWarm of the BigtableServer interface.

func (*Server) ReadModifyWriteRow

ReadModifyWriteRow implements ReadModifyWriteRow of the BigtableServer interface.

func (*Server) ReadRows

ReadRows implements ReadRows of the BigtableServer interface.

func (*Server) SampleRowKeys

SampleRowKeys implements SampleRowKeys of the BigtableServer interface.

Jump to

Keyboard shortcuts

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