Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerManager ¶
type ControllerManager struct { UpdateChan chan ServiceUpdate // contains filtered or unexported fields }
ControllerManager checks the services available on the controller, and fetches new tokens for newly discovered services. It will update the ArgoManager with new endpoints, and remove old ones.
func MakeControllerManager ¶
func MakeControllerManager(conf Config, serviceTypes []string) *ControllerManager
MakeControllerManager returns a new ControllerManager which will periodically poll the controller for services, and send
func (*ControllerManager) Check ¶
func (m *ControllerManager) Check() error
Check returns the last error received during a sync, if any. Used for a healthcheck status.
func (*ControllerManager) Shutdown ¶
func (m *ControllerManager) Shutdown()
Shutdown tells the manager to stop doing updates and causes all goprocs started to exit as cleanly as possible.
type ServiceUpdate ¶
type ServiceUpdate struct { Operation string // delete, update (implies add) Name string Type string AgentName string Annotations map[string]string // Only set for update Token string // Only set for update URL string // Only set for update }
ServiceUpdate contains an update message sent when a new service type is discovered or is no longer present in the controller.
Operation is either 'update' or 'delete'. For both, Name, Type, and AgentName will be set. For update only, the URL and Token will also be included.