Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigFile embed.FS
View Source
var ConfigFileFlag *string
ConfigFile is the flag used to load the config file
View Source
var InitConfigFlag = flag.String("init-config", "", "Initialize configuration file")
InitConfigFlag is the flag used to initialize the config file
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
func (*Config) LoadConfigFromfile ¶ added in v1.3.0
LoadConfigFromFile loads the given config file and applies it to c
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.