Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeoIPRetriever ¶
type MaxmindConfig ¶
type MaxmindConfig struct {
MaxmindDownloadURL string
MaxmindAccountID string
MaxmindLicenseKey string
}
Configuration variables for the MaxmindManager components.
type MaxmindManager ¶
type MaxmindManager struct {
// contains filtered or unexported fields
}
MaxmindManager is the component which enables lookups for GeoIP information of resolvers.
func NewMaxmind ¶
func NewMaxmind(conf MaxmindConfig) *MaxmindManager
func (*MaxmindManager) GetCountryAndContinent ¶
func (m *MaxmindManager) GetCountryAndContinent(ctx context.Context, ip netip.Addr) (country string, continent string, err error)
Retrieve the country code and continent code for a given ip address. Blocks while MaxMind is unavailable.
func (*MaxmindManager) Start ¶
func (m *MaxmindManager) Start(ctx context.Context, group *errgroup.Group)
Start the MaxmindManager by downloading the Country database and keeping it up to date.
func (*MaxmindManager) WaitForUpdate ¶
func (m *MaxmindManager) WaitForUpdate()
Lets another component wait for the updated Condition.
Click to show internal directories.
Click to hide internal directories.