whois

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPProto

type IPProto byte
const (
	IP4 IPProto = iota
	IP6
	IPany
)

type Whois

type Whois interface {
	// send !!
	EnableMultiCommand() error
	// send !t<timeout>
	SetIdleTimout(d time.Duration) error
	// send !v
	GetVersion() (string, error)

	// send query !i<set-name> or !i<set-name>,1 depending on bool
	GetSetMembers(set string, recursive bool) ([]string, error)
	// send query !i<set-name>,1
	GetAsSetMembersRecrusive(set string) ([]uint32, error)
	// send query !gAS<asn> or !6AS<asn> depending on p
	GetRoutesByOrigin(p IPProto, asn uint32) ([]netip.Prefix, error)
	// send query !a<as-set-name> !a4<as-set-name> or !a6<as-set-name> depending on p
	GetRoutesBySet(p IPProto, set string) ([]netip.Prefix, error)

	io.Closer
}

func New

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

func NewFromBufferedConn

func NewFromBufferedConn(c conn.BufferedConn) Whois

func NewFromNetConn

func NewFromNetConn(c net.Conn) Whois

type WhoisCache

type WhoisCache interface {
	UseCache(w Whois) Whois
}

func NewCache

func NewCache() WhoisCache

Jump to

Keyboard shortcuts

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