mock

package
v2.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: BSD-3-Clause Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTopologyDriver

func NewTopologyDriver(opts ...Option) *mock

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithAddPeersErr

func WithAddPeersErr(err error) Option

func WithClosestPeer

func WithClosestPeer(addr swarm.Address) Option

func WithClosestPeerErr

func WithClosestPeerErr(err error) Option

func WithIsWithinFunc

func WithIsWithinFunc(f func(swarm.Address) bool) Option

func WithMarshalJSONFunc

func WithMarshalJSONFunc(f func() ([]byte, error)) Option

func WithNeighborhoodDepth

func WithNeighborhoodDepth(dd uint8) Option

func WithPeers

func WithPeers(peers ...swarm.Address) Option

func WithSelectRecorder added in v2.8.1

func WithSelectRecorder(out *topology.Select) Option

WithSelectRecorder records the topology.Select most recently passed to EachConnectedPeer or EachConnectedPeerRev into out. Tests use this to assert callers opt in to filtering flags (e.g. IncludeBootnodes).

Jump to

Keyboard shortcuts

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