geoip

package
v1.8.8 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProcessorGeoIP

type ProcessorGeoIP struct {
	NoProvince    bool
	NoCity        bool
	NoCountry     bool
	NoCountryCode bool
	NoCoordinate  bool
	IPValueFlag   bool
	NoKeyError    bool
	NoMatchError  bool
	KeepSource    bool
	DBPath        string
	SourceKey     string
	Language      string
	// contains filtered or unexported fields
}

ProcessorGeoIP is a processor plugin to insert geographical information into log according to IP address specified by SourceKey. DBPath and related Language must be set because plugin does not contain any GeoIP database, the type of database should be mmdb. NoProvince/City/... are used to control the information granularity. The keys of geographical information will be prefixed with SourceKey, such as SourceKey_city_.

func (*ProcessorGeoIP) Description

func (*ProcessorGeoIP) Description() string

func (*ProcessorGeoIP) Init

func (p *ProcessorGeoIP) Init(context pipeline.Context) error

Init called for init some system resources, like socket, mutex...

func (*ProcessorGeoIP) ProcessGeoIP

func (p *ProcessorGeoIP) ProcessGeoIP(log *protocol.Log, val *string)

func (*ProcessorGeoIP) ProcessLog

func (p *ProcessorGeoIP) ProcessLog(log *protocol.Log)

func (*ProcessorGeoIP) ProcessLogs

func (p *ProcessorGeoIP) ProcessLogs(logArray []*protocol.Log) []*protocol.Log

Jump to

Keyboard shortcuts

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