mock

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

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