Documentation ¶
Index ¶
- Constants
- type AmazonMetadata
- type Application
- type ApplicationResponse
- type Applications
- type ApplicationsResponse
- type DataCenterInfo
- type DataCenterInfoType
- type DataCenterType
- type EurekaClientConfig
- type EurekaConfig
- type EurekaInstanceConfig
- type FormattedBuffer
- type Instance
- type LeaseInfo
- type Metadata
- type Port
- type RegisrationRequest
- type Registry
- type StatusType
Constants ¶
View Source
const ( Amazon = "Amazon" MyOwn = "MyOwn" DataCenterInfoClass = "com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo" )
Datacenter names
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AmazonMetadata ¶
type AmazonMetadata struct { Hostname string `json:"hostname'` PublicHostName string `json:"public-hostname"` LocalHostName string `json:"local-hostname"` PublicIpv4 string `json:"public-ipv4'` LocalIpv4 string `json:"local-ipv4"` AvailabilityZone string `json:"availability-zone"` InstanceId string `json:"instance-id"` InstanceType string `json:"instance-type"` AmiId string `json:"ami-id"` AmiLaunchIndex string `json:"ami-launch-index"` AmiManifestPath string `json:"ami-manifest-path"` }
type Application ¶
type Application struct { XMLName xml.Name `json:"application"` Name string `json:"name"` Instances []*Instance `json:"instance"` }
func (*Application) String ¶
func (a *Application) String() string
type ApplicationResponse ¶
type ApplicationResponse struct {
Response *Application `json:"application"`
}
type Applications ¶
type Applications struct { Applications []*Application `json:"application"` AppsHashcode string `json:"apps__hashcode"` VersionsDelta int `json:"versions__delta"` }
type ApplicationsResponse ¶
type ApplicationsResponse struct {
Response *Applications `json:"applications"`
}
type DataCenterInfo ¶
type DataCenterInfo struct { ClassName string `json:"@class"` Name string `json:"name"` Metadata *AmazonMetadata `json:"metadata,omitempty"` }
type DataCenterInfoType ¶
type PortType map[string]interface{}
type DataCenterType ¶
type DataCenterType uint8
type EurekaClientConfig ¶
type EurekaConfig ¶
type EurekaConfig struct { // Instance - Application Instance Information Instance EurekaInstanceConfig `json:"instance"` // Client - Eureka Client Configuration Client EurekaClientConfig `json:"client"` }
func NewConfigFromArgs ¶
func NewConfigFromArgs(appName, host string, port int, serviceUrls ...string) *EurekaConfig
func Read ¶
func Read(configFile string) (config EurekaConfig, err error)
func (*EurekaConfig) PopulateDefaults ¶
func (c *EurekaConfig) PopulateDefaults()
type EurekaInstanceConfig ¶
type EurekaInstanceConfig struct { AppName string `json:"app"` IpAddress string `json:"ipAddress"` HostName string `json:"hostName"` Port int `json:"port"` SecurePort int `json:"securePort"` PreferIpAddress bool `json:"preferIpAddress"` HomePageUrlPath string `json:"homePageUrlPath"` StatusPageUrlPath string `json:"statusPageUrlPath"` HealthCheckUrlPath string `json:"healthCheckUrlPath"` }
type FormattedBuffer ¶
type Instance ¶
type Instance struct { InstanceId string `json:"instanceId"` HostName string `json:"hostName"` AppName string `json:"app"` IpAddr string `json:"ipAddr"` VipAddr string `json:"vipAddress"` Status StatusType `json:"status"` Port Port `json:"port"` SecurePort Port `json:"securePort"` HomePageUrl string `json:"homePageUrl"` StatusPageUrl string `json:"statusPageUrl"` HealthCheckUrl string `json:"healthCheckUrl"` DataCenterInfo DataCenterInfo `json:"dataCenterInfo,omitempty"` Metadata Metadata `json:"metadata,omitempty"` }
func NewRegistrationFromInstanceConfig ¶
func NewRegistrationFromInstanceConfig(instance EurekaInstanceConfig) *Instance
func (*Instance) WrapInRequest ¶
func (i *Instance) WrapInRequest() *RegisrationRequest
type LeaseInfo ¶
type LeaseInfo struct { RenewalIntervalInSecs int32 `json:"renewalIntervalInSecs"` DurationInSecs int32 `json:"durationInSecs"` RegistrationTimestamp int64 `json:"registrationTimestamp"` LastRenewalTimestamp int64 `json:"lastRenewalTimestamp"` EvictionTimestamp int64 `json:"evictionTimestamp"` ServiceUpTimestamp int64 `json:"serviceUpTimestamp"` }
type RegisrationRequest ¶
type RegisrationRequest struct {
Instance *Instance `json:"instance"`
}
type Registry ¶
type Registry struct { XMLName xml.Name `json:"applications"` VersionDelta int `json:"versions__delta"` Hashcode string `json:"apps__hashcode"` Apps []*Application `json:"application"` }
type StatusType ¶
type StatusType string
const ( UP StatusType = "UP" DOWN StatusType = "DOWN" STARTING StatusType = "STARTING" OUTOFSERVICE StatusType = "OUT_OF_SERVICE" UNKNOWN StatusType = "UNKNOWN" )
Supported statuses
Click to show internal directories.
Click to hide internal directories.