Documentation
¶
Index ¶
- type Application
- type ApplicationsResponse
- type ApplicationsRootResponse
- type DataCenterInfo
- type EurekaDiscovery
- func (d *EurekaDiscovery) GetService(ctx context.Context, serviceName string) ([]*registry.ServiceInstance, error)
- func (d *EurekaDiscovery) GetServiceInstances(ctx context.Context, serverName string) []Instance
- func (d *EurekaDiscovery) Subscribe(serverName string, fn func()) error
- func (d *EurekaDiscovery) Unsubscribe(serverName string)
- func (d *EurekaDiscovery) Watch(ctx context.Context, serviceName string) (registry.Watcher, error)
- type Instance
- type Port
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type ApplicationsResponse ¶
type ApplicationsResponse struct {
Version string `json:"versions__delta"`
AppsHashcode string `json:"apps__hashcode"`
Applications []Application `json:"application"`
}
type ApplicationsRootResponse ¶
type ApplicationsRootResponse struct {
ApplicationsResponse `json:"applications"`
}
ApplicationsRootResponse for /eureka/apps
type DataCenterInfo ¶
type EurekaDiscovery ¶
type EurekaDiscovery struct {
// contains filtered or unexported fields
}
func NewEurekaDiscovery ¶
func NewEurekaDiscovery(options *regOps.DiscoveryOptions) *EurekaDiscovery
func (*EurekaDiscovery) GetService ¶
func (d *EurekaDiscovery) GetService(ctx context.Context, serviceName string) ([]*registry.ServiceInstance, error)
GetService get services from eureka
func (*EurekaDiscovery) GetServiceInstances ¶
func (d *EurekaDiscovery) GetServiceInstances(ctx context.Context, serverName string) []Instance
func (*EurekaDiscovery) Subscribe ¶
func (d *EurekaDiscovery) Subscribe(serverName string, fn func()) error
func (*EurekaDiscovery) Unsubscribe ¶
func (d *EurekaDiscovery) Unsubscribe(serverName string)
type Instance ¶
type Instance struct {
InstanceID string `json:"instanceId"`
HostName string `json:"hostName"`
Port Port `json:"port"`
App string `json:"app"`
IPAddr string `json:"ipAddr"`
VipAddress string `json:"vipAddress"`
Status string `json:"status"`
SecurePort Port `json:"securePort"`
HomePageURL string `json:"homePageUrl"`
StatusPageURL string `json:"statusPageUrl"`
HealthCheckURL string `json:"healthCheckUrl"`
DataCenterInfo DataCenterInfo `json:"dataCenterInfo"`
Metadata map[string]string `json:"metadata"`
}
Click to show internal directories.
Click to hide internal directories.