Documentation
¶
Overview ¶
Package isp provides isp lookup functions for IPv4 addresses
Index ¶
Constants ¶
View Source
const (
// DefaultCacheSize determines the default size for the ip cache
DefaultCacheSize = 100000
)
Variables ¶
This section is empty.
Functions ¶
func ORG ¶
ORG returns the Organization name for a given IPv4 address (similar to ISP but may have different data depending on provider used).
func SetProvider ¶
SetProvider sets the ISP data provider
Types ¶
type Provider ¶
type Provider interface {
// ISP looks up the name of the Internet Service Provider corresponding to the
// given ip.
ISP(ip string) (isp string, found bool)
// ORG looks up the name of the Organization corresponding to the given ip
// (may be different than ISP).
ORG(ip string) (org string, found bool)
// ASN looks up the Autonomous System Number corresponding to the given ip.
ASN(ip string) (asn int, found bool)
// ASName looks up the Autonomous System Name corresponding to the given ip.
ASName(ip string) (asnName string, found bool)
}
Provider implements the actual looking up of ISP and ASN information.
Click to show internal directories.
Click to hide internal directories.