Versions in this module Expand all Collapse all v1 v1.4.0 Jul 14, 2021 Changes in this version + const Amazon + const MyOwn + var ErrNotInAWS = fmt.Errorf("Not in AWS") + var EurekaURLSlugs = map[string]string + var HttpClient = &http.Client + func HTTPResponseStatusCode(err error) (code int, present bool) + func Shuffled(o *instanceQueryOptions) error + func ThatAreUp(o *instanceQueryOptions) error + type AmazonMetadataType struct + AmiID string + AmiLaunchIndex string + AmiManifestPath string + AvailabilityZone string + HostName string + InstanceID string + InstanceType string + LocalHostname string + LocalIpv4 string + PublicHostname string + PublicIpv4 string + type AppNotFoundError struct + func (e AppNotFoundError) Error() string + type AppSource struct + func (s *AppSource) CopyLatestTo(dst *Application) bool + func (s *AppSource) Latest() *Application + func (s *AppSource) Stop() + type AppUpdate struct + App *Application + Err error + type Application struct + Instances []*Instance + Name string + func (a *Application) ParseAllMetadata() error + func (a *Application) UnmarshalJSON(b []byte) error + type Config struct + AWS aws + Eureka eureka + func ReadConfig(loc string) (conf Config, err error) + type DataCenterInfo struct + AlternateMetadata map[string]string + Class string + Metadata AmazonMetadataType + Name string + func (i *DataCenterInfo) MarshalJSON() ([]byte, error) + func (i *DataCenterInfo) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (i *DataCenterInfo) UnmarshalJSON(b []byte) error + func (i *DataCenterInfo) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + type EurekaConnection struct + DNSDiscovery bool + DiscoveryZone string + PollInterval time.Duration + PreferSameZone bool + Retries int + ServerURLBase string + ServicePort int + ServiceUrls []string + Timeout time.Duration + UseJson bool + func NewConn(address ...string) (e EurekaConnection) + func NewConnFromConfig(conf Config) (c EurekaConnection) + func NewConnFromConfigFile(location string) (c EurekaConnection, err error) + func (e *EurekaConnection) DeregisterInstance(ins *Instance) error + func (e *EurekaConnection) GetApp(name string) (*Application, error) + func (e *EurekaConnection) GetApps() (map[string]*Application, error) + func (e *EurekaConnection) GetInstance(app, insId string) (*Instance, error) + func (e *EurekaConnection) GetInstancesByVIPAddress(addr string, secure bool, opts ...InstanceQueryOption) ([]*Instance, error) + func (e *EurekaConnection) HeartBeatInstance(ins *Instance) error + func (e *EurekaConnection) NewAppSource(name string, await bool) *AppSource + func (e *EurekaConnection) NewInstanceSetSourceForApp(name string, await bool, opts ...InstanceQueryOption) (*InstanceSetSource, error) + func (e *EurekaConnection) NewInstanceSetSourceForVIPAddress(addr string, secure bool, await bool, opts ...InstanceQueryOption) (*InstanceSetSource, error) + func (e *EurekaConnection) RegisterInstance(ins *Instance) error + func (e *EurekaConnection) ReregisterInstance(ins *Instance) error + func (e *EurekaConnection) ScheduleAppInstanceUpdates(name string, await bool, done <-chan struct{}, opts ...InstanceQueryOption) (<-chan InstanceSetUpdate, error) + func (e *EurekaConnection) ScheduleAppUpdates(name string, await bool, done <-chan struct{}) <-chan AppUpdate + func (e *EurekaConnection) ScheduleVIPAddressUpdates(addr string, secure bool, await bool, done <-chan struct{}, ...) (<-chan InstanceSetUpdate, error) + func (e *EurekaConnection) SelectServiceURL() string + func (e *EurekaConnection) UpdateApp(app *Application) + func (e EurekaConnection) AddMetadataString(ins *Instance, key, value string) error + func (e EurekaConnection) UpdateInstanceStatus(ins *Instance, status StatusType) error + type GetAppResponseJson struct + Application Application + type GetAppsResponse struct + Applications []*Application + AppsHashcode string + VersionsDelta int + func (r *GetAppsResponse) UnmarshalJSON(b []byte) error + type GetAppsResponseJson struct + Response *GetAppsResponse + type Instance struct + App string + CountryId int64 + DataCenterInfo DataCenterInfo + HealthCheckUrl string + HomePageUrl string + HostName string + IPAddr string + InstanceId string + LeaseInfo LeaseInfo + Metadata InstanceMetadata + Overriddenstatus StatusType + Port int + PortEnabled bool + SecurePort int + SecurePortEnabled bool + SecureVipAddress string + Status StatusType + StatusPageUrl string + UniqueID func(i Instance) string + VipAddress string + func (i *Instance) Id() string + func (i *Instance) MarshalJSON() ([]byte, error) + func (i *Instance) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (i *Instance) UnmarshalJSON(b []byte) error + func (i *Instance) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + func (ins *Instance) SetMetadataString(key, value string) + type InstanceMetadata struct + Raw []byte + func (i *InstanceMetadata) MarshalJSON() ([]byte, error) + func (i *InstanceMetadata) UnmarshalJSON(b []byte) error + func (i InstanceMetadata) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (im *InstanceMetadata) GetBool(key string) (b bool, err error) + func (im *InstanceMetadata) GetFloat32(key string) (f float32, err error) + func (im *InstanceMetadata) GetFloat64(key string) (f float64, err error) + func (im *InstanceMetadata) GetInt(key string) (i int, err error) + func (im *InstanceMetadata) GetMap() map[string]interface{} + func (im *InstanceMetadata) GetString(key string) (s string, err error) + type InstanceQueryOption func(*instanceQueryOptions) error + func ShuffledWith(r *rand.Rand) InstanceQueryOption + func WithStatus(status StatusType) InstanceQueryOption + type InstanceSetSource struct + func (s *InstanceSetSource) Latest() []*Instance + func (s *InstanceSetSource) Stop() + type InstanceSetUpdate struct + Err error + Instances []*Instance + type LeaseInfo struct + DurationInSecs int32 + EvictionTimestamp int64 + LastRenewalTimestamp int64 + RegistrationTimestamp int64 + RenewalIntervalInSecs int32 + ServiceUpTimestamp int64 + type PreliminaryDataCenterInfo struct + Class string + Metadata metadataMap + Name string + type RegisterInstanceJson struct + Instance *Instance + type StatusType string + const DOWN + const OUTOFSERVICE + const STARTING + const UNKNOWN + const UP v1.3.0 Jun 14, 2018 v1.2.0 Sep 27, 2016 v1.1.0 Feb 26, 2016