mock

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: BSD-3-Clause Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 WithCursors

func WithCursors(v []uint64, e uint64) Option

func WithReplies added in v1.17.0

func WithReplies(replies ...SyncReply) Option

func WithSyncError added in v1.10.0

func WithSyncError(err error) Option

type PullSyncMock

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

func NewPullSync

func NewPullSync(opts ...Option) *PullSyncMock

func (*PullSyncMock) CursorsCalls

func (p *PullSyncMock) CursorsCalls(peer swarm.Address) bool

func (*PullSyncMock) GetCursors

func (p *PullSyncMock) GetCursors(_ context.Context, peer swarm.Address) ([]uint64, uint64, error)

func (*PullSyncMock) ResetCalls added in v1.17.0

func (p *PullSyncMock) ResetCalls(peer swarm.Address)

func (*PullSyncMock) SetEpoch added in v1.17.4

func (p *PullSyncMock) SetEpoch(epoch uint64)

func (*PullSyncMock) Sync added in v1.17.0

func (p *PullSyncMock) Sync(ctx context.Context, peer swarm.Address, bin uint8, start uint64) (topmost uint64, count int, err error)

func (*PullSyncMock) SyncCalls

func (p *PullSyncMock) SyncCalls(peer swarm.Address) (res []SyncReply)

type SyncReply

type SyncReply struct {
	Peer    swarm.Address
	Bin     uint8
	Start   uint64
	Topmost uint64
	Count   int
}

Jump to

Keyboard shortcuts

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