Documentation
¶
Index ¶
Constants ¶
View Source
const (
AGENT_VERBOSE_LEVEL = 6
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConsulServiceAgent ¶
type ConsulServiceAgent struct { /* the client */ Client *consulapi.Client /* the wait index */ WaitIndex uint64 }
func (*ConsulServiceAgent) FindServices ¶
func (r *ConsulServiceAgent) FindServices(filter string) ([]Service, error)
func (*ConsulServiceAgent) GetService ¶
func (r *ConsulServiceAgent) GetService(svc *consulapi.CatalogService) (service Service)
func (*ConsulServiceAgent) WatchServices ¶
func (r *ConsulServiceAgent) WatchServices(service *Service, updateChannel chan *Service) (chan bool, error)
type DiscoveryAgent ¶
type DiscoveryAgent interface { /* search for service which match the filter */ FindServices(filter string) ([]Service, error) /* notify my channel of updates to services */ WatchServices(services *Service, updateChannel chan *Service) (chan bool, error) }
func NewConsulServiceAgent ¶
func NewConsulServiceAgent(uri *url.URL) (DiscoveryAgent, error)
Click to show internal directories.
Click to hide internal directories.