geoannotator

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeoAnnotator added in v0.3.0

type GeoAnnotator interface {
	annotator.Annotator
	Reload(context.Context)
	AnnotateIP(ip net.IP, geo **annotator.Geolocation) error
}

GeoAnnotator is just a regular annotator with a Reload method and an AnnotateIP method.

func New

func New(ctx context.Context, geo content.Provider, localIPs []net.IP) GeoAnnotator

New makes a new Annotator that uses IP addresses to generate geolocation and ASNumber metadata for that IP based on the current copy of MaxMind data stored in GCS.

Jump to

Keyboard shortcuts

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