crtestutil

package
v0.0.0-...-0921c0e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2017 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package crtestutil defines helpers for conflict resolution tests.

Index

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

type ConflictStreamImpl struct {
	St        *State
	AdvanceFn func(*State) bool
}

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 (*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

type State

type State struct {
	Mu  sync.Mutex
	Val wire.ConflictInfo

	ValIndex int
	// contains filtered or unexported fields
}

func (*State) GetAdvanceCount

func (st *State) GetAdvanceCount() int

func (*State) GetIsBlocked

func (st *State) GetIsBlocked() bool

func (*State) GetResult

func (st *State) GetResult() []wire.ResolutionInfo

func (*State) IncrementAdvanceCount

func (st *State) IncrementAdvanceCount()

func (*State) SetIsBlocked

func (st *State) SetIsBlocked(isBlocked bool)

type TestError

type TestError struct {
	// contains filtered or unexported fields
}

func (*TestError) Error

func (e *TestError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL