Documentation
¶
Overview ¶
Package sd pkg/services/sd/config.go c2-vis-appsvc
Package sd pkg/services/sd/sd.go c2-vis-appsvc
service-discovery as a pkg/services.Service.
Index ¶
Constants ¶
View Source
const Type = "service-discovery"
Type is the registry key used in services.json blocks.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Path string `json:"-"`
PubKey cipher.PubKey `json:"public_key,omitempty"`
SecKey cipher.SecKey `json:"secret_key,omitempty"`
Addr string `json:"addr,omitempty"`
MetricsAddr string `json:"metrics_addr,omitempty"`
PprofAddr string `json:"pprof_addr,omitempty"`
Redis string `json:"redis,omitempty"`
EntryTimeout services.Duration `json:"entry_timeout,omitempty"`
LogLevel string `json:"log_level,omitempty"`
TestMode bool `json:"test_mode,omitempty"`
Mode string `json:"mode,omitempty"`
Whitelist []string `json:"whitelist_keys,omitempty"`
SurveyWhitelist []cipher.PubKey `json:"survey_whitelist,omitempty"`
// GeoIP is the URL of the geoip service. Visors populate Geo on
// their entries directly post-#2439; field kept for backward
// compatibility.
GeoIP string `json:"geoip,omitempty"`
// DmsgPort is the dmsghttp listener port (default 80).
DmsgPort uint16 `json:"dmsg_port,omitempty"`
// Dmsg is the dmsg-related config block — same shape across
// every deployment service that uses it.
Dmsg cmdutil.DmsgConfig `json:"dmsg,omitempty"`
}
Config is the JSON configuration for service-discovery.
func ParseBlock ¶
ParseBlock decodes a services.json block into a Config.
Click to show internal directories.
Click to hide internal directories.