mycelium

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostError added in v1.1.6

type HostError struct {
	Host  host.Host
	Error error
}

type HostFilter added in v1.1.6

type HostFilter func(host.Host) bool

type Network

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

func New

func New(options ...Option) (*Network, error)

func (*Network) Add

func (n *Network) Add(hosts ...host.Host) error

func (*Network) Hosts

func (n *Network) Hosts() (hosts []host.Host)

func (*Network) Run

func (n *Network) Run(ctx context.Context, concurrency uint16, handler func(context.Context, host.Host) error) <-chan *HostError

to stop at first error set concurrency=1 and stop at first error

func (*Network) Size added in v1.1.6

func (n *Network) Size() int

func (*Network) StreamHosts added in v1.1.6

func (n *Network) StreamHosts(ctx context.Context) chan host.Host

func (*Network) Sub added in v1.1.6

func (n *Network) Sub(filter HostFilter) *Network

type Option

type Option func(*Network) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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