Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitCaches ¶
func InitCaches() error
InitCaches does an initial fetch of all Zones and PAC Files this differs from the automated lookup in that it also errors out when minor problems are found
func InitEventLogger ¶
func InitEventLogger()
func LaunchServer ¶
func LaunchServer()
func LoadConfig ¶
func ReadPidFile ¶
ReadPidFile reads the process ID from the configured PID file
func WritePidFile ¶
func WritePidFile() error
WritePidFile writes the current process ID to the configured PID file
Types ¶
type Config ¶
type LookupElement ¶
type LookupElement struct {
IPMap *ipMap `json:"IPMap"`
PAC *pacTemplate `json:"PAC"`
// the parsed content of the PAC Template
Variant string
}
func NewLookupElement ¶
func NewLookupElement(ipMap *ipMap, pac *pacTemplate, contactInfo string) (LookupElement, error)
type YAMLConfig ¶
type YAMLConfig struct {
// YAML unfortunately doesn't support default values
// we can, however, use pointers to identify if a value is not set
IPMapFile *string `yaml:"ipMapFile"`
PACRoot *string `yaml:"pacRoot"`
DefaultPACFile *string `yaml:"defaultPACFile"`
WPADFile *string `yaml:"wpadFile"`
ContactInfo *string `yaml:"contactInfo"`
AccessLogFile *string `yaml:"accessLogFile"`
EventLogFile *string `yaml:"eventLogFile"`
MaxCacheAge *int64 `yaml:"maxCacheAge"`
PidFile *string `yaml:"pidFile"`
Port *uint16 `yaml:"port"`
PrometheusEnabled *bool `yaml:"prometheusEnabled"`
PrometheusPath *string `yaml:"prometheusPath"`
IgnoreMinors *bool `yaml:"ignoreMinors"`
Loglevel *string `yaml:"loglevel"`
}
Click to show internal directories.
Click to hide internal directories.