Documentation ¶
Index ¶
- Variables
- type Application
- type Applications
- type DataCenterInfo
- type Discovery
- type Instance
- type MetaData
- type Port
- type SDConfig
- func (*SDConfig) Name() string
- func (c *SDConfig) NewDiscoverer(opts discovery.DiscovererOptions) (discovery.Discoverer, error)
- func (*SDConfig) NewDiscovererMetrics(reg prometheus.Registerer, rmi discovery.RefreshMetricsInstantiator) discovery.DiscovererMetrics
- func (c *SDConfig) SetDirectory(dir string)
- func (c *SDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
- type Tag
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSDConfig = SDConfig{ RefreshInterval: model.Duration(30 * time.Second), HTTPClientConfig: config.DefaultHTTPClientConfig, }
DefaultSDConfig is the default Eureka SD configuration.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Applications ¶
type Applications struct { VersionsDelta int `xml:"versions__delta"` AppsHashcode string `xml:"apps__hashcode"` Applications []Application `xml:"application"` }
type DataCenterInfo ¶
type Discovery ¶
Discovery provides service discovery based on a Eureka instance.
func NewDiscovery ¶
func NewDiscovery(conf *SDConfig, logger log.Logger, metrics discovery.DiscovererMetrics) (*Discovery, error)
NewDiscovery creates a new Eureka discovery for the given role.
type Instance ¶
type Instance struct { HostName string `xml:"hostName"` HomePageURL string `xml:"homePageUrl"` StatusPageURL string `xml:"statusPageUrl"` HealthCheckURL string `xml:"healthCheckUrl"` App string `xml:"app"` IPAddr string `xml:"ipAddr"` VipAddress string `xml:"vipAddress"` SecureVipAddress string `xml:"secureVipAddress"` Status string `xml:"status"` Port *Port `xml:"port"` SecurePort *Port `xml:"securePort"` DataCenterInfo *DataCenterInfo `xml:"dataCenterInfo"` Metadata *MetaData `xml:"metadata"` IsCoordinatingDiscoveryServer bool `xml:"isCoordinatingDiscoveryServer"` ActionType string `xml:"actionType"` CountryID int `xml:"countryId"` InstanceID string `xml:"instanceId"` }
type SDConfig ¶
type SDConfig struct { Server string `yaml:"server,omitempty"` HTTPClientConfig config.HTTPClientConfig `yaml:",inline"` RefreshInterval model.Duration `yaml:"refresh_interval,omitempty"` }
SDConfig is the configuration for applications running on Eureka.
func (*SDConfig) NewDiscoverer ¶
func (c *SDConfig) NewDiscoverer(opts discovery.DiscovererOptions) (discovery.Discoverer, error)
NewDiscoverer returns a Discoverer for the Config.
func (*SDConfig) NewDiscovererMetrics ¶ added in v0.50.0
func (*SDConfig) NewDiscovererMetrics(reg prometheus.Registerer, rmi discovery.RefreshMetricsInstantiator) discovery.DiscovererMetrics
NewDiscovererMetrics implements discovery.Config.
func (*SDConfig) SetDirectory ¶
SetDirectory joins any relative file paths with dir.
func (*SDConfig) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.