Documentation
¶
Index ¶
- Constants
- type BasicAuth
- type CIDR
- type Config
- type ConsulConfig
- type DNSServerConfig
- type DcPosition
- type Duration
- type GeoDb
- type GeoLoc
- type HTTPServerConfig
- type HealthCheckConfig
- type Log
- type MetricsConfig
- type PluginHealthCheckConfig
- type Position
- type ProxyMetricsConfig
- type ProxyMetricsTarget
- type TLSPem
- type URLConfig
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 BasicAuth ¶ added in v0.8.0
func (*BasicAuth) GetBasicAuth ¶ added in v0.8.0
func (*BasicAuth) UnmarshalYAML ¶ added in v0.8.0
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"`
MetricsConfig *MetricsConfig `yaml:"metrics"`
}
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 ¶
func (*GeoDb) UnmarshalYAML ¶
type GeoLoc ¶
type GeoLoc struct {
DcPositions []*DcPosition `yaml:"dc_positions"`
GeoDb *GeoDb `yaml:"geo_db"`
}
func (*GeoLoc) UnmarshalYAML ¶
type HTTPServerConfig ¶
type HTTPServerConfig struct {
Listen string `yaml:"listen"`
ListenLocalPort uint `yaml:"listen_local_port"`
TLSPem TLSPem `yaml:"tls_pem"`
}
func (*HTTPServerConfig) UnmarshalYAML ¶
func (c *HTTPServerConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type HealthCheckConfig ¶
type HealthCheckConfig struct {
HealthcheckAddress string `yaml:"healthcheck_address"`
HealthcheckAuth *BasicAuth `yaml:"healthcheck_auth"`
AllowOnlyLocalhost bool `yaml:"allow_only_localhost"`
Plugins []*PluginHealthCheckConfig `yaml:"plugins"`
}
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 ¶
type MetricsConfig ¶ added in v0.9.0
type MetricsConfig struct {
AllowedInspect []*CIDR `yaml:"allowed_inspect"`
TrustXFF bool `yaml:"trust_xff"`
ProxyMetricsConfig *ProxyMetricsConfig `yaml:"proxy"`
}
func (*MetricsConfig) UnmarshalYAML ¶ added in v0.10.0
func (u *MetricsConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type PluginHealthCheckConfig ¶ added in v0.23.0
type PluginHealthCheckConfig struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
Path string `yaml:"path"`
Args []string `yaml:"args"`
}
func (*PluginHealthCheckConfig) UnmarshalYAML ¶ added in v0.23.0
func (c *PluginHealthCheckConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type ProxyMetricsConfig ¶ added in v0.9.0
type ProxyMetricsConfig struct {
Targets []*ProxyMetricsTarget `yaml:"targets"`
}
type ProxyMetricsTarget ¶ added in v0.9.0
func (*ProxyMetricsTarget) UnmarshalYAML ¶ added in v0.9.0
func (u *ProxyMetricsTarget) UnmarshalYAML(unmarshal func(interface{}) error) error
Click to show internal directories.
Click to hide internal directories.