Help us shape the future of Go! Take the 2026 Go Developer Survey

netwalker

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Found

type Found struct {
	Network    *netutil.NetworkConfig
	Req        string // The raw request string. name, short ID, or long ID.
	MatchIndex int    // Begins with 0, up to MatchCount - 1.
	MatchCount int    // 1 on exact match. > 1 on ambiguous match. Never be <= 0.
}

type NetworkWalker

type NetworkWalker struct {
	Client  *netutil.CNIEnv
	OnFound OnFound
}

func (*NetworkWalker) Walk

func (w *NetworkWalker) Walk(ctx context.Context, req string) (int, error)

Walk walks networks and calls w.OnFound . Req is name, short ID, or long ID. Returns the number of the found entries.

type OnFound

type OnFound func(ctx context.Context, found Found) error

Jump to

Keyboard shortcuts

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