eureka

package
v1.93.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2023 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SDCheckInterval = flag.Duration("promscrape.eurekaSDCheckInterval", 30*time.Second, "Interval for checking for changes in eureka. "+
	"This works only if eureka_sd_configs is configured in '-promscrape.config' file. "+
	"See https://docs.victoriametrics.com/sd_configs.html#eureka_sd_configs for details")

SDCheckInterval defines interval for targets refresh.

Functions

This section is empty.

Types

type Application

type Application struct {
	Name      string     `xml:"name"`
	Instances []Instance `xml:"instance"`
}

Application - eureka application https://github.com/Netflix/eureka/wiki/Eureka-REST-operations/

type DataCenterInfo

type DataCenterInfo struct {
	Name     string   `xml:"name"`
	Metadata MetaData `xml:"metadata"`
}

DataCenterInfo -eureka datacentre metadata

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"`
	CountryID        int            `xml:"countryId"`
	InstanceID       string         `xml:"instanceId"`
}

Instance - eureka instance https://github.com/Netflix/eureka/wiki/Eureka-REST-operations

type MetaData

type MetaData struct {
	Items []Tag `xml:",any"`
}

MetaData - eureka objects metadata.

type Port

type Port struct {
	Port    int  `xml:",chardata"`
	Enabled bool `xml:"enabled,attr"`
}

Port - eureka instance port.

type SDConfig

type SDConfig struct {
	Server            string                     `yaml:"server,omitempty"`
	HTTPClientConfig  promauth.HTTPClientConfig  `yaml:",inline"`
	ProxyURL          *proxy.URL                 `yaml:"proxy_url,omitempty"`
	ProxyClientConfig promauth.ProxyClientConfig `yaml:",inline"`
}

SDConfig represents service discovery config for eureka.

See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#eureka

func (*SDConfig) GetLabels added in v1.55.0

func (sdc *SDConfig) GetLabels(baseDir string) ([]*promutils.Labels, error)

GetLabels returns Eureka labels according to sdc.

func (*SDConfig) MustStop added in v1.55.0

func (sdc *SDConfig) MustStop()

MustStop stops further usage for sdc.

type Tag

type Tag struct {
	XMLName xml.Name
	Content string `xml:",innerxml"`
}

Tag - eureka metadata tag - list of k/v values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL