Documentation ¶
Index ¶
- type Option
- type PullSyncMock
- func (p *PullSyncMock) CancelRuid(ctx context.Context, peer penguin.Address, ruid uint32) error
- func (p *PullSyncMock) Close() error
- func (p *PullSyncMock) CursorsCalls(peer penguin.Address) bool
- func (p *PullSyncMock) GetCursors(_ context.Context, peer penguin.Address) ([]uint64, error)
- func (p *PullSyncMock) LiveSyncCalls(peer penguin.Address) (res []SyncCall)
- func (p *PullSyncMock) SyncCalls(peer penguin.Address) (res []SyncCall)
- func (p *PullSyncMock) SyncInterval(ctx context.Context, peer penguin.Address, bin uint8, from, to uint64) (topmost uint64, ruid uint32, err error)
- func (p *PullSyncMock) TriggerChange()
- type SyncCall
- type SyncReply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithAutoReply ¶
func WithAutoReply() Option
WithAutoReply means that the pull syncer will automatically reply to incoming range requests with a top = from+limit. This is in order to force the requester to request a subsequent range.
func WithCursors ¶
func WithLateSyncReply ¶
func WithLiveSyncBlock ¶
func WithLiveSyncBlock() Option
WithLiveSyncBlock makes the protocol mock block on incoming live sync requests (identified by the math.MaxUint64 `to` field).
func WithLiveSyncReplies ¶
type PullSyncMock ¶
type PullSyncMock struct {
// contains filtered or unexported fields
}
func NewPullSync ¶
func NewPullSync(opts ...Option) *PullSyncMock
func (*PullSyncMock) CancelRuid ¶
func (*PullSyncMock) Close ¶
func (p *PullSyncMock) Close() error
func (*PullSyncMock) CursorsCalls ¶
func (p *PullSyncMock) CursorsCalls(peer penguin.Address) bool
func (*PullSyncMock) GetCursors ¶
func (*PullSyncMock) LiveSyncCalls ¶
func (p *PullSyncMock) LiveSyncCalls(peer penguin.Address) (res []SyncCall)
func (*PullSyncMock) SyncCalls ¶
func (p *PullSyncMock) SyncCalls(peer penguin.Address) (res []SyncCall)
func (*PullSyncMock) SyncInterval ¶
func (*PullSyncMock) TriggerChange ¶
func (p *PullSyncMock) TriggerChange()
Click to show internal directories.
Click to hide internal directories.