Documentation
¶
Index ¶
- Constants
- func GetInstanceURL(host, id string) (string, error)
- func RegisterInstance(eurekaHost string, instance *Instance) error
- func UnregisterApp(eurekaHost, app, hostName string) error
- type Application
- type Applications
- type DataCenter
- type Instance
- type Lease
- type MetaData
- type Port
- type RegistrationRequest
- type State
- type Status
Constants ¶
View Source
const ( UP = "UP" DOWN = "DOWN" UNKNOWN = "UNKNOWN" )
Variables ¶
This section is empty.
Functions ¶
func GetInstanceURL ¶
func RegisterInstance ¶
func UnregisterApp ¶
Example: localhost:8761, foo-service, FOO:8081
Types ¶
type Application ¶
type Application struct { XMLName xml.Name `json:"-" xml:"application"` Name string `json:"name" xml:"name"` Instances []*Instance `json:"instance" xml:"instance"` }
func (*Application) ReplaceInstances ¶
func (app *Application) ReplaceInstances(newInstances []*Instance)
type Applications ¶
type Applications struct { XMLName xml.Name `json:"-" xml:"applications"` Version interface{} `json:"versions__delta" xml:"versions__delta"` Status string `json:"apps__hashcode" xml:"apps__hashcode"` Applications []*Application `json:"application" xml:"application"` }
func (*Applications) AddApp ¶
func (a *Applications) AddApp(app ...*Application)
func (*Applications) ContainsApp ¶
func (a *Applications) ContainsApp(ID string) (bool, *Application)
type DataCenter ¶
type DataCenter struct { Class string `json:"@class" xml:"class,attr"` Name string `json:"name" xml:"name"` }
func DefaultDataCenter ¶
func DefaultDataCenter() *DataCenter
type Instance ¶
type Instance struct { InstanceID string `json:"instanceId" xml:"instanceId"` HostName string `json:"hostName" xml:"hostName"` App string `json:"app" xml:"app"` IPAddress string `json:"ipAddr" xml:"ipAddr"` Status Status `json:"status" xml:"status"` OverriddenStatus Status `json:"overriddenstatus" xml:"overriddenstatus"` Port *Port `json:"port,omitempty" xml:"port,omitempty"` SecurePort *Port `json:"securePort,omitempty" xml:"securePort,omitempty"` CountryID int `json:"countryId" xml:"countryId"` DataCenter *DataCenter `json:"dataCenterInfo" xml:"dataCenterInfo"` Lease *Lease `json:"leaseInfo" xml:"leaseInfo"` MetaData *MetaData `json:"metadata" xml:"metadata"` HomePageURL string `json:"homePageUrl" xml:"homePageUrl"` StatusPageURL string `json:"statusPageUrl" xml:"statusPageUrl"` HealthCheckURL string `json:"healthCheckUrl" xml:"healthCheckUrl"` VIPAddress string `json:"vipAddress" xml:"vipAddress"` SecureVIPAddress string `json:"secureVipAddress" xml:"secureVipAddress"` IsCoordinatingDiscoveryServer string `json:"isCoordinatingDiscoveryServer" xml:"isCoordinatingDiscoveryServer"` LastUpdatedTimestamp string `json:"lastUpdatedTimestamp" xml:"lastUpdatedTimestamp"` LastDirtyTimestamp string `json:"lastDirtyTimestamp" xml:"lastDirtyTimestamp"` ActionType string `json:"actionType" xml:"actionType"` }
Information about a single instance.
func NewInstance ¶
type Lease ¶
type Lease struct { RenewalIntervalInSecs int DurationInSecs int RegistrationTimestamp int LastRenewalTimestamp int EvictionTimestamp int ServiceUpTimestamp int }
func DefaultLease ¶
func DefaultLease() *Lease
type MetaData ¶
type MetaData struct {
InstanceID string `json:"instanceId" xml:"instanceId"`
}
func NewMetaData ¶
type Port ¶
type Port struct { Number int `json:"$" xml:",chardata"` Enabled string `json:"@enabled" xml:"enabled,attr"` }
func SecurePort ¶
func SecurePort() *Port
type RegistrationRequest ¶
type RegistrationRequest struct {
Instance *Instance `json:"instance" xml:"instance"`
}
A request that is send when a service should be registered in eureka.
type State ¶
type State struct {
Apps *Applications `json:"applications"`
}
Click to show internal directories.
Click to hide internal directories.