Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRequestTimeout = errors.New("unable to queue the geo request for processing")
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { GeoDBPath string MaxMindUrlTemplate string MaxMindKey string TorUrl string MaxMindUpdateInterval time.Duration TorUpdateInterval time.Duration }
func NewDefaultConfig ¶
func NewDefaultConfig() Config
NewDefaultConfig creates a sane config with daily maxmind checks and hourly tor checks
type ExitAddress ¶
Type ExitAddress represents an IP address and active time
type GeoLocation ¶
type GeoLocation struct { Position *Position `json:"position"` ISP *ISP `json:"network"` City string `json:"city"` Country string `json:"country"` CountryISO string `json:"iso_country"` Location string `json:"location"` LocationI18n map[string]string `json:"localized_location"` TorNode *string `json:"tor_node"` }
type TorHash ¶
type TorHash struct {
// contains filtered or unexported fields
}
Type TorHash implements a hash structure for TorNodes. It is not thread safe for writes, but will tolerate concurrent readers.
func NewTorHash ¶
func NewTorHash() *TorHash
func (*TorHash) Exists ¶
Looks up the specified IP to see if it exists and returns the node id if it does.
type TorNode ¶
Type TorNode represents a single node in the tor network.
func NewTorNode ¶
func NewTorNode() *TorNode
type VersionData ¶
Click to show internal directories.
Click to hide internal directories.