location

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Locator

type Locator struct {
	// contains filtered or unexported fields
}

func New

func New(zoneMaps []*ZoneMapSpec) (*Locator, error)

func (*Locator) Lookup

func (l *Locator) Lookup(ip net.IP) (string, bool)

func (*Locator) LookupRequest

func (l *Locator) LookupRequest(req *http.Request) (string, bool)

type ZoneMapSpec

type ZoneMapSpec struct {
	Type           string   `yaml:"type"`
	GeoIPDataFiles []string `yaml:"geoip_data_files"`
	Path           string   `yaml:"path"`
	Value          string   `yaml:"value"`
}

ZoneMapSpec describes ip -> zone lookup maps.

Jump to

Keyboard shortcuts

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