maxmind

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Type = "maxmind"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Database *database.Config `yaml:"database"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Maxmind

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

func New

func New(config *Config, log logrus.FieldLogger) (*Maxmind, error)

func (*Maxmind) LookupIP

func (m *Maxmind) LookupIP(ctx context.Context, ip net.IP) (*lookup.Result, error)

func (*Maxmind) Start

func (m *Maxmind) Start(ctx context.Context) error

func (*Maxmind) Stop

func (m *Maxmind) Stop(ctx context.Context) error

func (*Maxmind) Type

func (m *Maxmind) Type() string

type Metrics

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

func NewMetrics

func NewMetrics(namespace string) *Metrics

func (*Metrics) AddLookupIP

func (m *Metrics) AddLookupIP(count int, providerType, status string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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