geolite2

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLocator

func NewLocator(ctx context.Context, fetcher GeoliteFetcher) (geoip.Locator, error)

NewLocator initializes a new geoip.Locator by setting up access to the GeoIP databases. If the databases do not exist locally, they will be downloaded using the provided fetcher method.

Types

type GeoliteFetcher

type GeoliteFetcher func(context.Context) error

GeoliteFetcher defines a function type for asynchronously fetching and downloading GeoIP databases.

func FetchFromLicenseKey

func FetchFromLicenseKey(licenseKey string) GeoliteFetcher

FetchFromLicenseKey initializes a GeoipFetcher that downloads the GeoLite2 database files from MaxMind, using the provided license key to authenticate.

func FetchFromMirror

func FetchFromMirror(mirror string) GeoliteFetcher

Jump to

Keyboard shortcuts

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