Versions in this module Expand all Collapse all v1 v1.1.0 Jun 3, 2019 v1.0.0 May 31, 2019 Changes in this version + const DOWN + const ErrCodeEurekaNotReachable + const ErrCodeInstanceNotFound + const STARTING + const UP + var ErrRequestCancelled = errors.New("sending request is cancelled") + func DefaultCheckRetry(cluster *Cluster, numReqs int, lastResp http.Response, err error) error + func GetLogger() *log.Logger + func SetLogger(loggerLog *log.Logger) + type Application struct + Instances []InstanceInfo + Name string + type Applications struct + Applications []Application + AppsHashcode string + VersionsDelta int + type Client struct + CheckRetry func(cluster *Cluster, numReqs int, lastResp http.Response, err error) error + Cluster *Cluster + Config Config + func NewClient(machines []string) *Client + func NewClientFromFile(fpath string) (*Client, error) + func NewClientFromReader(reader io.Reader) (*Client, error) + func NewTLSClient(machines []string, cert string, key string, caCerts []string) (*Client, error) + func (c *Client) AddRootCA(caCert string) error + func (c *Client) Delete(endpoint string) (*RawResponse, error) + func (c *Client) Get(endpoint string) (*RawResponse, error) + func (c *Client) GetApplication(appId string) (*Application, error) + func (c *Client) GetApplications() (*Applications, error) + func (c *Client) GetCluster() []string + func (c *Client) GetInstance(appId, instanceId string) (*InstanceInfo, error) + func (c *Client) GetSVIP(svipId string) (*Applications, error) + func (c *Client) GetVIP(vipId string) (*Applications, error) + func (c *Client) MarshalJSON() ([]byte, error) + func (c *Client) Post(endpoint string, body []byte) (*RawResponse, error) + func (c *Client) Put(endpoint string, body []byte) (*RawResponse, error) + func (c *Client) RegisterInstance(appId string, instanceInfo *InstanceInfo) error + func (c *Client) SendHeartbeat(appId, instanceId string) error + func (c *Client) SendRequest(rr *RawRequest) (*RawResponse, error) + func (c *Client) SetCluster(machines []string) bool + func (c *Client) SetDialTimeout(d time.Duration) + func (c *Client) SetTransport(tr *http.Transport) + func (c *Client) SyncCluster() bool + func (c *Client) UnmarshalJSON(b []byte) error + func (c *Client) UnregisterInstance(appId, instanceId string) error + type Cluster struct + Leader string + Machines []string + func NewCluster(machines []string) *Cluster + type Config struct + CaCertFile []string + CertFile string + Consistency string + DialTimeout time.Duration + KeyFile string + type DataCenterInfo struct + Class string + Metadata *DataCenterMetadata + Name string + type DataCenterMetadata struct + AmiId string + AmiLaunchIndex string + AmiManifestPath string + AvailabilityZone string + Hostname string + InstanceId string + InstanceType string + LocalHostname string + LocalIpv4 string + PublicHostname string + PublicIpv4 string + type EurekaError struct + Cause string + ErrorCode int + Index uint64 + Message string + func (e EurekaError) Error() string + type Instance struct + Instance *InstanceInfo + type InstanceInfo struct + ActionType string + App string + CountryId int + DataCenterInfo *DataCenterInfo + HealthCheckUrl string + HomePageUrl string + HostName string + InstanceID string + IpAddr string + IsCoordinatingDiscoveryServer bool + LastDirtyTimestamp int + LastUpdatedTimestamp int + LeaseInfo *LeaseInfo + Metadata *MetaData + Overriddenstatus string + Port *Port + SecurePort *Port + SecureVipAddress string + Status string + StatusPageUrl string + VipAddress string + func NewInstanceInfo(hostName, app, ip string, port int, ttl uint, isSsl bool) *InstanceInfo + type LeaseInfo struct + DurationInSecs int + EvictionDurationInSecs uint + EvictionTimestamp int + LastRenewalTimestamp int + RegistrationTimestamp int + RenewalIntervalInSecs int + ServiceUpTimestamp int + type MetaData struct + Class string + Map map[string]string + func (s *MetaData) MarshalJSON() ([]byte, error) + func (s *MetaData) MarshalXML(e *xml.Encoder, start xml.StartElement) error + func (s *MetaData) UnmarshalJSON(data []byte) error + func (s *MetaData) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error + type Port struct + Enabled bool + Port int + type RawRequest struct + func NewRawRequest(method, relativePath string, body []byte, cancel <-chan bool) *RawRequest + type RawResponse struct + Body []byte + Header http.Header + StatusCode int + type Vraw struct + Class string + Content []byte