benchserver

package
v0.45.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// KvMeta is the Metadata for mocked KV table.
	KvMeta = sppb.ResultSetMetadata{
		RowType: &sppb.StructType{
			Fields: []*sppb.StructType_Field{
				{
					Name: "Key",
					Type: &sppb.Type{Code: sppb.TypeCode_STRING},
				},
				{
					Name: "Value",
					Type: &sppb.Type{Code: sppb.TypeCode_STRING},
				},
			},
		},
	}
)

Functions

func EncodeResumeToken

func EncodeResumeToken(t uint64) []byte

EncodeResumeToken return mock resume token encoding for an uint64 integer.

Types

type MockCloudSpanner

type MockCloudSpanner struct {
	sppb.SpannerServer
	// contains filtered or unexported fields
}

MockCloudSpanner is a mock implementation of SpannerServer interface.

func NewMockCloudSpanner

func NewMockCloudSpanner() (*MockCloudSpanner, error)

NewMockCloudSpanner creates a new MockCloudSpanner instance.

func (*MockCloudSpanner) Addr

func (m *MockCloudSpanner) Addr() string

Addr returns the listening address of mock server.

func (*MockCloudSpanner) CreateSession

CreateSession is a placeholder for SpannerServer.CreateSession.

func (*MockCloudSpanner) DeleteSession

DeleteSession is a placeholder for SpannerServer.DeleteSession.

func (*MockCloudSpanner) ExecuteStreamingSql

ExecuteStreamingSql is a mock implementation of SpannerServer.ExecuteStreamingSql.

func (*MockCloudSpanner) Serve

func (m *MockCloudSpanner) Serve() error

Serve starts the server and blocks.

func (*MockCloudSpanner) Stop

func (m *MockCloudSpanner) Stop()

Stop terminates MockCloudSpanner and closes the serving port.

func (*MockCloudSpanner) StreamingRead

StreamingRead is a placeholder for SpannerServer.StreamingRead.

Jump to

Keyboard shortcuts

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