eureka

package
v0.0.0-...-74183db Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmazonMetadata

type AmazonMetadata struct {
	AMILaunchIndex   string `xml:"ami-launch-index"`
	LocalHostName    string `xml:"local-hostname"`
	AvailabilityZone string `xml:"availability-zone"`
	InstanceId       string `xml:"instance-id"`
	PublicIPV4       string `xml:"public-ipv4"`
	PublicHostName   string `xml:"public-hostname"`
	AMIManifestPath  string `xml:"ami-manifest-path"`
	LocalIPV4        string `xml:"local-ipv4"`
	HostName         string `xml:"hostname"`
	AMIId            string `xml:"ami-id"`
	InstanceType     string `xml:"instance-type"`
}

type Application

type Application struct {
	XMLName  xml.Name `xml:"application"`
	Name     string   `xml:"name"`
	Instance Instance `xml:"instance"`
}

type Applications

type Applications struct {
	XMLName              xml.Name    `xml:"applications"`
	VersionsDelta        int         `xml:"versions__delta"`
	ApplicationsHashCode string      `xml:"apps__hashcode"`
	Application          Application `xml:"application"`
}

type DCNameType

type DCNameType string
const (
	MyOwn  DCNameType = "MyOwn"
	Amazon DCNameType = "Amazon"
)

type DataCenterInfo

type DataCenterInfo struct {
	Name     DCNameType     `xml:"name"`
	Metadata AmazonMetadata `xml:"metadata"`
}

type Instance

type Instance struct {
	XMLName          xml.Name       `xml:"instance"`
	HostName         string         `xml:"hostName"`
	Application      string         `xml:"app"`
	InstanceId       string         `xml:"instanceId"`
	IPAddress        string         `xml:"ipAddr"`
	VIPAddress       string         `xml:"vipAddress"`
	SecureVIPAddress string         `xml:"secureVipAddress"`
	Status           StatusType     `xml:"status"`
	OverriddenStatus StatusType     `xml:"overriddenStatus"`
	Port             int            `xml:"port"`
	SecurePort       int            `xml:"securePort"`
	HomePageURL      string         `xml:"homePageUrl"`
	StatusPageURL    string         `xml:"statusPageUrl"`
	HealthCheckURL   string         `xml:"healthCheckUrl"`
	DataCenterInfo   DataCenterInfo `xml:"dataCenterInfo"`
	LeaseInfo        LeaseInfo      `xml:"leaseInfo"`
}

func CreateInstance

func CreateInstance(instanceId string, instance RegistryInstance) (*Instance, error)

type LeaseInfo

type LeaseInfo struct {
	DurationInSecs        int `xml:"durationInSecs"`
	RenewalIntervalInSecs int `xml:"renewalIntervalInSecs"`
	RegistrationTimestamp int `xml:"registrationTimestamp"`
	LastRenewalTimestamp  int `xml:"lastRenewalTimestamp"`
	EvictionTimestamp     int `xml:"evictionTimestamp"`
	ServiceUpTimestamp    int `xml:"serviceUpTimestamp"`
}

type RegistryInstance

type RegistryInstance struct {
	AppName    string
	Port       int
	SecurePort int
}

type StatusType

type StatusType string
const (
	Up           StatusType = "UP"
	Down         StatusType = "DOWN"
	Starting     StatusType = "STARTING"
	OutOfService StatusType = "OUT_OF_SERVICE"
	Unknown      StatusType = "UNKNOWN"
)

Jump to

Keyboard shortcuts

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