eureka

package
v1.50.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLabels

func GetLabels(sdc *SDConfig, baseDir string) ([]map[string]string, error)

GetLabels returns Eureka labels according to sdc.

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"`
	Token      *string             `yaml:"token"`
	Datacenter string              `yaml:"datacenter"`
	Scheme     string              `yaml:"scheme,omitempty"`
	Username   string              `yaml:"username"`
	Password   string              `yaml:"password"`
	TLSConfig  *promauth.TLSConfig `yaml:"tls_config,omitempty"`
	// RefreshInterval time.Duration `yaml:"refresh_interval"`
	// refresh_interval is obtained from `-promscrape.ec2SDCheckInterval` command-line option.
	Port *int `yaml:"port,omitempty"`
}

SDConfig represents service discovery config for eureka.

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

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