Documentation ¶
Overview ¶
Package crtestutil defines helpers for conflict resolution tests.
Index ¶
- type ConflictStream
- type ConflictStreamImpl
- type CrStreamImpl
- type MockWireDatabaseClient
- func (wclient *MockWireDatabaseClient) GetSchemaMetadata(ctx *context.T, opts ...rpc.CallOpt) (sm wire.SchemaMetadata, err error)
- func (wclient *MockWireDatabaseClient) SetSchemaMetadata(ctx *context.T, i0 wire.SchemaMetadata, opts ...rpc.CallOpt) error
- func (wclient *MockWireDatabaseClient) StartConflictResolver(ctx *context.T, opts ...rpc.CallOpt) (wire.ConflictManagerStartConflictResolverClientCall, error)
- type ResolutionStream
- type ResolutionStreamImpl
- type State
- type TestError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConflictStream ¶
type ConflictStream interface { Advance() bool Value() wire.ConflictInfo Err() error }
type ConflictStreamImpl ¶
func (*ConflictStreamImpl) Advance ¶
func (cs *ConflictStreamImpl) Advance() bool
func (*ConflictStreamImpl) Err ¶
func (cs *ConflictStreamImpl) Err() error
func (*ConflictStreamImpl) Value ¶
func (cs *ConflictStreamImpl) Value() wire.ConflictInfo
type CrStreamImpl ¶
type CrStreamImpl struct { C ConflictStream R ResolutionStream }
func (*CrStreamImpl) Finish ¶
func (s *CrStreamImpl) Finish() error
func (*CrStreamImpl) RecvStream ¶
func (s *CrStreamImpl) RecvStream() interface { Advance() bool Value() wire.ConflictInfo Err() error }
func (*CrStreamImpl) SendStream ¶
func (s *CrStreamImpl) SendStream() interface { Send(item wire.ResolutionInfo) error Close() error }
type MockWireDatabaseClient ¶
type MockWireDatabaseClient struct { wire.DatabaseClientMethods // contains filtered or unexported fields }
func MockDbClient ¶
func MockDbClient(c wire.DatabaseClientMethods, crs *CrStreamImpl) *MockWireDatabaseClient
func (*MockWireDatabaseClient) GetSchemaMetadata ¶
func (wclient *MockWireDatabaseClient) GetSchemaMetadata(ctx *context.T, opts ...rpc.CallOpt) (sm wire.SchemaMetadata, err error)
func (*MockWireDatabaseClient) SetSchemaMetadata ¶
func (wclient *MockWireDatabaseClient) SetSchemaMetadata(ctx *context.T, i0 wire.SchemaMetadata, opts ...rpc.CallOpt) error
func (*MockWireDatabaseClient) StartConflictResolver ¶
func (wclient *MockWireDatabaseClient) StartConflictResolver(ctx *context.T, opts ...rpc.CallOpt) (wire.ConflictManagerStartConflictResolverClientCall, error)
type ResolutionStream ¶
type ResolutionStream interface {
Send(item wire.ResolutionInfo) error
}
type ResolutionStreamImpl ¶
type ResolutionStreamImpl struct {
St *State
}
func (*ResolutionStreamImpl) Send ¶
func (rs *ResolutionStreamImpl) Send(item wire.ResolutionInfo) error
type State ¶
type State struct { Mu sync.Mutex Val wire.ConflictInfo ValIndex int // contains filtered or unexported fields }
func (*State) GetAdvanceCount ¶
func (*State) GetIsBlocked ¶
func (*State) GetResult ¶
func (st *State) GetResult() []wire.ResolutionInfo
func (*State) IncrementAdvanceCount ¶
func (st *State) IncrementAdvanceCount()
func (*State) SetIsBlocked ¶
Click to show internal directories.
Click to hide internal directories.