Documentation ¶
Index ¶
Constants ¶
View Source
const ( ConsulKVEntriesPrefix = "gsloc/entries/" ConsulPrefixTagRatio = "gsloc_ratio=" ConsulPrefixTagTag = "gsloc_tag-" ConsulPrefixTagDc = "gsloc_dc=" ConsulPrefixTagDisabled = "gsloc_disabled" ConsulMetaEntryKey = "gsloc_entry" ConsulMetaDcKey = "gsloc_dc" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CIDR ¶
func (*CIDR) UnmarshalYAML ¶
type Config ¶
type Config struct { DNSServer *DNSServerConfig `yaml:"dns_server"` HTTPServer *HTTPServerConfig `yaml:"http_server"` Log *Log `yaml:"log"` DcName string `yaml:"dc_name"` ConsulConfig *ConsulConfig `yaml:"consul_config"` HealthCheckConfig *HealthCheckConfig `yaml:"healthcheck_config"` GeoLoc *GeoLoc `yaml:"geo_loc"` }
func LoadConfig ¶
func (*Config) UnmarshalYAML ¶
type ConsulConfig ¶
type ConsulConfig struct { Addr string `yaml:"addr"` Scheme string `yaml:"scheme"` Token string `yaml:"token"` Username string `yaml:"username"` Password string `yaml:"password"` ScrapInterval *Duration `yaml:"scrap_interval"` }
func (*ConsulConfig) UnmarshalYAML ¶
func (c *ConsulConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type DNSServerConfig ¶
type DNSServerConfig struct { Listen string `yaml:"listen"` TrustEdns bool `yaml:"trust_edns"` AllowedInspect []*CIDR `yaml:"allowed_inspect"` }
func (*DNSServerConfig) UnmarshalYAML ¶
func (c *DNSServerConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type DcPosition ¶
type DcPosition struct { DcName string `yaml:"dc_name"` Position Position `yaml:"position"` Cidrs []*CIDR `yaml:"cidrs"` }
func (*DcPosition) UnmarshalYAML ¶
func (c *DcPosition) UnmarshalYAML(unmarshal func(interface{}) error) error
type Duration ¶
func (*Duration) UnmarshalYAML ¶
type GeoDb ¶
type GeoDb struct { Path string `yaml:"path"` Reader *geoip2.Reader `yaml:"-"` }
func (*GeoDb) UnmarshalYAML ¶
type GeoLoc ¶
type GeoLoc struct { DcPositions []*DcPosition `yaml:"dc_positions"` GeoDb *GeoDb `yaml:"geo_db"` }
func (*GeoLoc) UnmarshalYAML ¶
type HTTPServerConfig ¶
func (*HTTPServerConfig) UnmarshalYAML ¶
func (c *HTTPServerConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type HealthCheckConfig ¶
type HealthCheckConfig struct {
HealthcheckAddress string `yaml:"healthcheck_address"`
}
func (*HealthCheckConfig) UnmarshalYAML ¶
func (c *HealthCheckConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type Log ¶
type Log struct { Level string `yaml:"level"` NoColor bool `yaml:"no_color"` InJson bool `yaml:"in_json"` }
func (*Log) UnmarshalYAML ¶
Click to show internal directories.
Click to hide internal directories.