Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoMetadataFound = errors.New("no geo IP metadata found")
ErrNoMetadataFound error should be returned when a provider could not find the corresponding IP metadata
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.104.0
type Config interface { component.ConfigValidator }
Config is the configuration of a GeoIPProvider.
type GeoIPProvider ¶
type GeoIPProvider interface { // Location returns a set of attributes representing the geographical location for the given IP address. It requires a context for managing request lifetime. Location(context.Context, net.IP) (attribute.Set, error) }
GeoIPProvider defines methods for obtaining the geographical location based on the provided IP address.
type GeoIPProviderFactory ¶ added in v0.105.0
type GeoIPProviderFactory interface { // CreateDefaultConfig creates the default configuration for the GeoIPProvider. CreateDefaultConfig() Config // CreateGeoIPProvider creates a provider based on this config. Processor's settings are provided as an argument to initialize the logger if needed. CreateGeoIPProvider(ctx context.Context, settings processor.Settings, cfg Config) (GeoIPProvider, error) }
GeoIPProviderFactory can create GeoIPProvider instances.
Click to show internal directories.
Click to hide internal directories.