Documentation ¶
Index ¶
- type Option
- type PullSyncMock
- func (p *PullSyncMock) CancelRuid(ctx context.Context, peer swarm.Address, ruid uint32) error
- func (p *PullSyncMock) Close() error
- func (p *PullSyncMock) CursorsCalls(peer swarm.Address) bool
- func (p *PullSyncMock) GetCursors(_ context.Context, peer swarm.Address) ([]uint64, error)
- func (p *PullSyncMock) LiveSyncCalls(peer swarm.Address) (res []SyncCall)
- func (p *PullSyncMock) SyncCalls(peer swarm.Address) (res []SyncCall)
- func (p *PullSyncMock) SyncInterval(ctx context.Context, peer swarm.Address, bin uint8, from, to uint64) (topmost uint64, 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 ¶
func WithSyncError ¶ added in v1.10.0
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 swarm.Address) bool
func (*PullSyncMock) GetCursors ¶
func (*PullSyncMock) LiveSyncCalls ¶
func (p *PullSyncMock) LiveSyncCalls(peer swarm.Address) (res []SyncCall)
func (*PullSyncMock) SyncCalls ¶
func (p *PullSyncMock) SyncCalls(peer swarm.Address) (res []SyncCall)
func (*PullSyncMock) SyncInterval ¶
func (*PullSyncMock) TriggerChange ¶
func (p *PullSyncMock) TriggerChange()
Click to show internal directories.
Click to hide internal directories.