async

package
v0.0.0-...-d1f544e Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsSetMembers

type AsSetMembers = <-chan Result[[]uint32]

type Result

type Result[T any] interface {
	Error() error
	Data() T
}

type Routes

type Routes = <-chan Result[[]netip.Prefix]

type SetMembers

type SetMembers = <-chan Result[[]string]

type Whois

type Whois interface {
	Start(n int) error
	Stop()
	// send !t<timeout>
	SetIdleTimout(t time.Duration)
	// send !v
	GetVersion() <-chan Result[string]
	// send query !i<set-name> or !i<set-name>,1 depending on bool, safe for concurrent use
	GetSetMembers(set string, recursive bool) SetMembers
	// send query !i<set-name>,1, safe for concurrent use
	GetAsSetMembersRecrusive(set string) AsSetMembers
	// send query !gAS<asn> or !6AS<asn> depending on p, safe for concurrent use
	GetRoutesByOrigin(p whois.IPProto, asn uint32) Routes
	// send query !a<as-set-name> !a4<as-set-name> or !a6<as-set-name> depending on p, safe for concurrent use
	GetRoutesBySet(p whois.IPProto, set string) Routes

	ExpandSet(p whois.IPProto, set string) Routes
}

func New

func New(address string, timeout time.Duration) Whois

Jump to

Keyboard shortcuts

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