mock

package
v2.2.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 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

func WithReplies(replies ...SyncReply) Option

func WithSyncError

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

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

func (*PullSyncMock) SetEpoch

func (p *PullSyncMock) SetEpoch(epoch uint64)

func (*PullSyncMock) Sync

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