Documentation ¶
Index ¶
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 communicates with Consul and monitors for changes
func NewController ¶
func NewController(addr string) (*Controller, error)
NewController creates a new Consul controller
func (*Controller) AppendServiceChangeHandler ¶
func (c *Controller) AppendServiceChangeHandler(serviceChanged func())
AppendServiceHandler implements a service catalog operation
func (*Controller) Run ¶
func (c *Controller) Run(stop <-chan struct{})
Run until a stop signal is received
func (*Controller) ServiceChanged ¶
func (c *Controller) ServiceChanged() error
func (*Controller) ServiceEntries ¶
func (c *Controller) ServiceEntries() ([]*istio.ServiceEntry, error)
Services list declarations of all services in the system
type Monitor ¶
type Monitor interface { Start(<-chan struct{}) AppendServiceChangeHandler(ServiceChangeHandler) }
Monitor handles service and instance changes
func NewConsulMonitor ¶
NewConsulMonitor watches for changes in Consul services and CatalogServices
type ServiceChangeHandler ¶
type ServiceChangeHandler func() error
ServiceChangeHandler processes service change events It's just a notification, we don't need to pass the changed services
Click to show internal directories.
Click to hide internal directories.