testutil

package
v2.12.15 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImplemented = errors.New("testutil: not implemented")

Functions

This section is empty.

Types

type Driver

type Driver struct {
	OnCall       func(ctx context.Context, code MethodCode, req, res interface{}) error
	OnStreamRead func(ctx context.Context, code MethodCode, req, res interface{}, process func(error)) error
	OnClose      func() error
}

func (*Driver) Call

func (d *Driver) Call(ctx context.Context, op ydb.Operation) (ydb.CallInfo, error)

func (*Driver) Close

func (d *Driver) Close() error

func (*Driver) StreamRead

func (d *Driver) StreamRead(ctx context.Context, op ydb.StreamOperation) (ydb.CallInfo, error)

type MethodCode

type MethodCode uint
const (
	UnknownMethod MethodCode = iota
	TableCreateSession
	TableDeleteSession
	TableKeepAlive
	TableCreateTable
	TableDropTable
	TableAlterTable
	TableCopyTable
	TableDescribeTable
	TableExplainDataQuery
	TablePrepareDataQuery
	TableExecuteDataQuery
	TableExecuteSchemeQuery
	TableBeginTransaction
	TableCommitTransaction
	TableRollbackTransaction
	TableDescribeTableOptions
	TableStreamReadTable
	TableStreamExecuteScanQuery
)

func (MethodCode) String

func (m MethodCode) String() string

type StubTicker

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

func (StubTicker) Destroy

func (s StubTicker) Destroy()

func (*StubTicker) Emit

func (s *StubTicker) Emit(t time.Time)

func (*StubTicker) Reset

func (s *StubTicker) Reset(d time.Duration, f func(time.Time))

type TableBeginTransactionResult

type TableBeginTransactionResult struct {
	R interface{}
}

func (TableBeginTransactionResult) SetTransactionID

func (t TableBeginTransactionResult) SetTransactionID(id string)

type TableCreateSessionResult

type TableCreateSessionResult struct {
	R interface{}
}

func (TableCreateSessionResult) SetSessionID

func (t TableCreateSessionResult) SetSessionID(id string)

type TableExecuteDataQueryRequest

type TableExecuteDataQueryRequest struct {
	R interface{}
}

func (TableExecuteDataQueryRequest) KeepInCache

func (t TableExecuteDataQueryRequest) KeepInCache() (keepInCache bool, ok bool)

func (TableExecuteDataQueryRequest) SessionID

func (t TableExecuteDataQueryRequest) SessionID() (id string)

func (TableExecuteDataQueryRequest) TransactionID

func (t TableExecuteDataQueryRequest) TransactionID() (id string, ok bool)

type TableExecuteDataQueryResult

type TableExecuteDataQueryResult struct {
	R interface{}
}

func (TableExecuteDataQueryResult) SetTransactionID

func (t TableExecuteDataQueryResult) SetTransactionID(id string)

type TableKeepAliveResult

type TableKeepAliveResult struct {
	R interface{}
}

func (TableKeepAliveResult) SetSessionStatus

func (t TableKeepAliveResult) SetSessionStatus(ready bool)

type TablePrepareDataQueryResult

type TablePrepareDataQueryResult struct {
	R interface{}
}

func (TablePrepareDataQueryResult) SetQueryID

func (t TablePrepareDataQueryResult) SetQueryID(id string)

Jump to

Keyboard shortcuts

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