Documentation ¶
Index ¶
- type Controller
- func (c *Controller) AddRegistry(registry Registry)
- func (c *Controller) AppendInstanceHandler(f func(*model.ServiceInstance, model.Event)) error
- func (c *Controller) AppendServiceHandler(f func(*model.Service, model.Event)) error
- func (c *Controller) DeleteRegistry(clusterID string)
- func (c *Controller) GetIstioServiceAccounts(hostname model.Hostname, ports []int) []string
- func (c *Controller) GetProxyServiceInstances(node *model.Proxy) ([]*model.ServiceInstance, error)
- func (c *Controller) GetRegistries() []Registry
- func (c *Controller) GetRegistryIndex(clusterID string) (int, bool)
- func (c *Controller) GetService(hostname model.Hostname) (*model.Service, error)
- func (c *Controller) InstancesByPort(hostname model.Hostname, port int, labels model.LabelsCollection) ([]*model.ServiceInstance, error)
- func (c *Controller) ManagementPorts(addr string) model.PortList
- func (c *Controller) Run(stop <-chan struct{})
- func (c *Controller) Services() ([]*model.Service, error)
- func (c *Controller) WorkloadHealthCheckInfo(addr string) model.ProbeList
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller aggregates data across different registries and monitors for changes
func NewController ¶
func NewController() *Controller
NewController creates a new Aggregate controller
func (*Controller) AddRegistry ¶
func (c *Controller) AddRegistry(registry Registry)
AddRegistry adds registries into the aggregated controller
func (*Controller) AppendInstanceHandler ¶
func (c *Controller) AppendInstanceHandler(f func(*model.ServiceInstance, model.Event)) error
AppendInstanceHandler implements a service instance catalog operation
func (*Controller) AppendServiceHandler ¶
AppendServiceHandler implements a service catalog operation
func (*Controller) DeleteRegistry ¶
func (c *Controller) DeleteRegistry(clusterID string)
DeleteRegistry deletes specified registry from the aggregated controller
func (*Controller) GetIstioServiceAccounts ¶
func (c *Controller) GetIstioServiceAccounts(hostname model.Hostname, ports []int) []string
GetIstioServiceAccounts implements model.ServiceAccounts operation
func (*Controller) GetProxyServiceInstances ¶
func (c *Controller) GetProxyServiceInstances(node *model.Proxy) ([]*model.ServiceInstance, error)
GetProxyServiceInstances lists service instances co-located with a given proxy
func (*Controller) GetRegistries ¶
func (c *Controller) GetRegistries() []Registry
GetRegistries returns a copy of all registries
func (*Controller) GetRegistryIndex ¶
func (c *Controller) GetRegistryIndex(clusterID string) (int, bool)
GetRegistryIndex returns the index of a registry
func (*Controller) GetService ¶
GetService retrieves a service by hostname if exists
func (*Controller) InstancesByPort ¶
func (c *Controller) InstancesByPort(hostname model.Hostname, port int, labels model.LabelsCollection) ([]*model.ServiceInstance, error)
InstancesByPort retrieves instances for a service on a given port that match any of the supplied labels. All instances match an empty label list.
func (*Controller) ManagementPorts ¶
func (c *Controller) ManagementPorts(addr string) model.PortList
ManagementPorts retrieves set of health check ports by instance IP Return on the first hit.
func (*Controller) Run ¶
func (c *Controller) Run(stop <-chan struct{})
Run starts all the controllers
func (*Controller) Services ¶
func (c *Controller) Services() ([]*model.Service, error)
Services lists services from all platforms
func (*Controller) WorkloadHealthCheckInfo ¶
func (c *Controller) WorkloadHealthCheckInfo(addr string) model.ProbeList
WorkloadHealthCheckInfo returne the health check information for IP addr Return on the first hit.
type Registry ¶
type Registry struct { Name serviceregistry.ServiceRegistry ClusterID string model.Controller model.ServiceDiscovery }
Registry specifies the collection of service registry related interfaces