Documentation ¶
Index ¶
- Variables
- func Compare(l, r value.V) (int, error)
- func Equal(t *testing.T, expected, actual interface{})
- func FileLine(skip int) string
- func NewDB(opts ...dbOption) db.Cluster
- func NoError(t *testing.T, err error)
- func NotNil(t *testing.T, value interface{})
- func SessionID(opts ...sessionIDOption) string
- func WithClose(onClose func(ctx context.Context) error) dbOption
- func WithInvokeHandlers(invokeHandlers InvokeHandlers) dbOption
- func WithNewStreamHandlers(newStreamHandlers NewStreamHandlers) dbOption
- func WithServiceID(serviceID uint32) sessionIDOption
- type BackoffFunc
- type ClientStream
- type InvokeHandlers
- type Method
- type MethodCode
- type NewStreamHandlers
- type StubTicker
Constants ¶
This section is empty.
Variables ¶
var ErrNotImplemented = errors.New("testutil: not implemented")
Functions ¶
func Compare ¶ added in v3.5.0
Compare compares its operands. It returns -1, 0, 1 if l < r, l == r, l > r. Returns error if types are not comparable. Comparable types are all integer types, UUID, DyNumber, Float, Double, String, UTF8, Date, Datetime, Timestamp, Tuples and Lists. Primitive arguments are comparable if their types are the same. Optional types is comparable to underlying types, e.g. Optional<Optional<Float>> is comparable to Float. Null value is comparable to non-null value of the same types and is considered less than any non-null value. Tuples and Lists are comparable if their elements are comparable. Tuples and Lists are compared lexicographically. If tuples (lists) have different length and elements of the shorter tuple (list) are all equal to corresponding elements of the other tuple (list), than the shorter tuple (list) is considered less than the longer one.
func WithInvokeHandlers ¶
func WithInvokeHandlers(invokeHandlers InvokeHandlers) dbOption
func WithNewStreamHandlers ¶
func WithNewStreamHandlers(newStreamHandlers NewStreamHandlers) dbOption
func WithServiceID ¶
func WithServiceID(serviceID uint32) sessionIDOption
Types ¶
type BackoffFunc ¶
BackoffFunc is an adapter to allow the use of ordinary functions as Backoff.
type ClientStream ¶
type ClientStream struct { OnHeader func() (metadata.MD, error) OnTrailer func() metadata.MD OnCloseSend func() error OnContext func() context.Context OnSendMsg func(m interface{}) error OnRecvMsg func(m interface{}) error }
func (*ClientStream) CloseSend ¶
func (s *ClientStream) CloseSend() error
func (*ClientStream) Context ¶
func (s *ClientStream) Context() context.Context
func (*ClientStream) RecvMsg ¶
func (s *ClientStream) RecvMsg(m interface{}) error
func (*ClientStream) SendMsg ¶
func (s *ClientStream) SendMsg(m interface{}) error
func (*ClientStream) Trailer ¶
func (s *ClientStream) Trailer() metadata.MD
type InvokeHandlers ¶
type InvokeHandlers map[MethodCode]func(request interface{}) (result proto.Message, err 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 NewStreamHandlers ¶
type NewStreamHandlers map[MethodCode]func(desc *grpc.StreamDesc) (grpc.ClientStream, error)
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)