mock

package
v1.17.4 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithBroadcastPeers added in v1.2.0

func WithBroadcastPeers(f func(context.Context, swarm.Address, ...swarm.Address) error) optionFunc

Types

type Discovery

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

func NewDiscovery

func NewDiscovery(opts ...Option) *Discovery

func (*Discovery) AddresseeRecords

func (d *Discovery) AddresseeRecords(addressee swarm.Address) (peers []swarm.Address, exists bool)

func (*Discovery) BroadcastPeers

func (d *Discovery) BroadcastPeers(ctx context.Context, addressee swarm.Address, peers ...swarm.Address) error

func (*Discovery) Broadcasts

func (d *Discovery) Broadcasts() int

func (*Discovery) Reset

func (d *Discovery) Reset()

type Option added in v1.2.0

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

Jump to

Keyboard shortcuts

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