Documentation ¶
Index ¶
- Variables
- func Compare(l, r value.Value) (int, error)
- func FileLine(skip int) string
- func NewBalancer(opts ...balancerOption) *balancerStub
- func QueryBind(bindings ...query.Bind) query.Bindings
- func SessionID(opts ...sessionIDOption) string
- func WithClose(onClose func(ctx context.Context) error) balancerOption
- func WithInvokeHandlers(invokeHandlers InvokeHandlers) balancerOption
- func WithNewStreamHandlers(newStreamHandlers NewStreamHandlers) balancerOption
- func WithNodeID(nodeID uint32) sessionIDOption
- func WithServiceID(serviceID uint32) sessionIDOption
- type BackoffFunc
- type ClientStream
- type InvokeHandlers
- type Method
- type MethodCode
- type NewStreamHandlers
- type QueryBindings
- type StubTicker
Constants ¶
This section is empty.
Variables ¶
var ErrNotComparable = xerrors.Wrap(fmt.Errorf("not comparable"))
var ErrNotImplemented = xerrors.Wrap(fmt.Errorf("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 NewBalancer ¶ added in v3.34.0
func NewBalancer(opts ...balancerOption) *balancerStub
func WithInvokeHandlers ¶
func WithInvokeHandlers(invokeHandlers InvokeHandlers) balancerOption
func WithNewStreamHandlers ¶
func WithNewStreamHandlers(newStreamHandlers NewStreamHandlers) balancerOption
func WithNodeID ¶ added in v3.44.0
func WithNodeID(nodeID uint32) sessionIDOption
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 QueryBindings ¶ added in v3.44.0
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)