package testutil
import "github.com/ydb-platform/ydb-go-sdk/v3/testutil"
Index ¶
- Variables
- func Compare(l, r value.Value) (int, error)
- func FileLine(skip int) string
- func NewBalancer(opts ...balancerOption) *balancerStub
- func QueryBind(bindings ...bind.Bind) bind.Bindings
- func SessionID(opts ...sessionIDOption) string
- func WithInvokeHandlers(invokeHandlers InvokeHandlers) balancerOption
- func WithNewStreamHandlers(newStreamHandlers NewStreamHandlers) balancerOption
- func WithNodeID(nodeID uint32) sessionIDOption
- func WithServiceID(serviceID uint32) sessionIDOption
- type BackoffFunc
- type ClientStream
- func (s *ClientStream) CloseSend() error
- func (s *ClientStream) Context() context.Context
- func (s *ClientStream) Header() (metadata.MD, error)
- func (s *ClientStream) RecvMsg(m interface{}) error
- func (s *ClientStream) SendMsg(m interface{}) error
- func (s *ClientStream) Trailer() metadata.MD
- type InvokeHandlers
- type Method
- type MethodCode
- type NewStreamHandlers
- type QueryBindings
- type StubTicker
- func (s StubTicker) Destroy()
- func (s *StubTicker) Emit(t time.Time)
- func (s *StubTicker) Reset(d time.Duration, f func(time.Time))
- type TopicReaderMessageBuilder
Variables ¶
Functions ¶
func Compare ¶
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 FileLine ¶
func NewBalancer ¶
func NewBalancer(opts ...balancerOption) *balancerStub
func QueryBind ¶
func SessionID ¶
func SessionID(opts ...sessionIDOption) string
func WithInvokeHandlers ¶
func WithInvokeHandlers(invokeHandlers InvokeHandlers) balancerOption
func WithNewStreamHandlers ¶
func WithNewStreamHandlers(newStreamHandlers NewStreamHandlers) balancerOption
func WithNodeID ¶
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.
func (BackoffFunc) Delay ¶
func (f BackoffFunc) Delay(i int) time.Duration
func (BackoffFunc) Wait ¶
func (f BackoffFunc) Wait(n int) <-chan time.Time
Wait implements Backoff interface.
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) Header ¶
func (s *ClientStream) Header() (metadata.MD, error)
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 Method ¶
type Method string
func (Method) Code ¶
func (m Method) Code() MethodCode
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 ¶
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 TopicReaderMessageBuilder ¶
type TopicReaderMessageBuilder = topicreaderinternal.PublicMessageBuilder
func NewTopicReaderMessageBuilder ¶
func NewTopicReaderMessageBuilder() *TopicReaderMessageBuilder
NewTopicReaderMessageBuilder create builder, which can create Message (use for tests only)
Source Files ¶
backoff.go compare.go driver.go file_line.go query_bind.go session.go time.go topic.go
- Version
- v3.62.0
- Published
- Apr 4, 2024
- Platform
- linux/amd64
- Imports
- 24 packages
- Last checked
- 3 minutes ago –
Tools for package owners.