Documentation
¶
Index ¶
- func NewTopologyDriver(opts ...Option) *mock
- type Option
- func WithAddPeersErr(err error) Option
- func WithClosestPeer(addr swarm.Address) Option
- func WithClosestPeerErr(err error) Option
- func WithIsWithinFunc(f func(swarm.Address) bool) Option
- func WithMarshalJSONFunc(f func() ([]byte, error)) Option
- func WithNeighborhoodDepth(dd uint8) Option
- func WithPeers(peers ...swarm.Address) Option
- func WithSelectRecorder(out *topology.Select) Option
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 WithClosestPeer ¶
func WithClosestPeerErr ¶
func WithMarshalJSONFunc ¶
func WithNeighborhoodDepth ¶
func WithSelectRecorder ¶ added in v2.8.1
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).
Click to show internal directories.
Click to hide internal directories.