Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BootStrapArgs ¶
type BootStrapArgs struct { ConsulAddress string Namespace string FQDN string EnableDefaultPort bool }
BootStrapArgs is a struct for passing arguments to the consul
func NewConsulBootStrapArgs ¶
func NewConsulBootStrapArgs() *BootStrapArgs
NewConsulBootStrapArgs constructs consulArgs with default value.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller communicates with Consul and monitors for changes
func NewController ¶
func NewController(addr, fqdn string, enableDefaultPort bool) (*Controller, error)
NewController creates a new Consul controller
func (*Controller) AppendServiceChangeHandler ¶
func (c *Controller) AppendServiceChangeHandler(serviceChanged func())
AppendServiceChangeHandler implements a service catalog operation
func (*Controller) Run ¶
func (c *Controller) Run(stop <-chan struct{})
Run until a stop signal is received
func (*Controller) ServiceEntries ¶
func (c *Controller) ServiceEntries() ([]*istio.ServiceEntry, error)
ServiceEntries 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