Documentation ¶
Index ¶
- Variables
- func FileLine(skip int) string
- func NewCluster(opts ...NewClusterOption) cluster.Cluster
- func SessionID(opts ...sessionIDOption) string
- func WithServiceID(serviceID uint32) sessionIDOption
- type BackoffFunc
- type ClientStream
- type InvokeHandlers
- type Method
- type MethodCode
- type NewClusterOption
- type NewStreamHandlers
- type StubTicker
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotImplemented = errors.New("testutil: not implemented")
Functions ¶
func NewCluster ¶
func NewCluster(opts ...NewClusterOption) cluster.Cluster
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 NewClusterOption ¶
type NewClusterOption func(c *db)
func WithInvokeHandlers ¶
func WithInvokeHandlers(invokeHandlers InvokeHandlers) NewClusterOption
func WithNewStreamHandlers ¶
func WithNewStreamHandlers(newStreamHandlers NewStreamHandlers) NewClusterOption
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)
Click to show internal directories.
Click to hide internal directories.