Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigFile embed.FS
Functions ¶
func WriteDefaultConfigFile ¶ added in v1.3.0
WriteDefaultConfigFile write default configuration file
Types ¶
type Config ¶
type Config struct {
Log LogConfig
HTTP HTTPConfig
GeoIP GeoIPConfig `toml:"geo-ip"`
Global GlobalConfig
Trackers []TrackerConfig
Outputs []outputs.Output
}
Config is the root of the configuration
func (*Config) GetTracker ¶
func (c *Config) GetTracker(trackingID string) *TrackerConfig
GetTracker retrive tracker configuration
type Duration ¶
Duration custom configuration type
func (*Duration) UnmarshalTOML ¶
UnmarshalTOML unmarshal TOML bytes to Duration
type GeoIPConfig ¶ added in v1.3.0
type GeoIPConfig struct {
Database string
}
GeoIPConfig for GeoIP configuration section
type GlobalConfig ¶
GlobalConfig for global configuration section
type HTTPConfig ¶ added in v1.3.0
type HTTPConfig struct {
ListenAddr string
}
HTTPConfig for HTTP configuration section
type TrackerConfig ¶ added in v1.3.0
type TrackerConfig struct {
Origin string
TrackingID string `toml:"tracking_id"`
Badge string
RateLimiting map[string]interface{}
RateLimiter usage.RateLimiter
}
TrackerConfig for tracker configurtion section
Click to show internal directories.
Click to hide internal directories.