Versions in this module Expand all Collapse all v0 v0.16.8 May 12, 2021 v0.16.7 Apr 1, 2021 Changes in this version + type Cluster struct + func NewCluster(name string, rCfg Config, store store.Store) (*Cluster, error) + func (c *Cluster) ServiceInfos() (ServiceInfos, error) + type Config struct + Backend string + Endpoints string + RegisterMaster bool + SleepInterval int + TLSAddress string + TLSCAFile string + TLSCAPath string + TLSCertFile string + TLSInsecureSkipVerify bool + TLSKeyFile string + TagMasterAs string + TagSlaveAs string + Token string + func (config *Config) ConsulConfig() (*api.Config, error) + func (config *Config) Validate() error + type ConsulAgent interface + ServiceDeregister func(serviceID string) error + ServiceRegister func(service *api.AgentServiceRegistration) error + type ConsulCatalog interface + Service func(service, tag string, q *api.QueryOptions) ([]*api.CatalogService, *api.QueryMeta, error) + type ConsulServiceDiscovery struct + func (cd *ConsulServiceDiscovery) DeRegister(info *ServiceInfo) error + func (cd *ConsulServiceDiscovery) Register(info *ServiceInfo) error + func (cd *ConsulServiceDiscovery) Services(name string) (ServiceInfos, error) + type HealthCheck struct + Interval string + TCP string + type ServiceDiscovery interface + DeRegister func(info *ServiceInfo) error + Register func(info *ServiceInfo) error + Services func(name string) (ServiceInfos, error) + func NewConsulServiceDiscovery(agent ConsulAgent, catalog ConsulCatalog) ServiceDiscovery + func NewServiceDiscovery(config *Config) (ServiceDiscovery, error) + type ServiceInfo struct + Address string + Check HealthCheck + ID string + IsMaster bool + Name string + Port int + Tags Tags + func NewServiceInfo(name string, db *cluster.DB, tags []string, isMaster bool) (*ServiceInfo, error) + func NewServiceInfoFromConsulService(service api.CatalogService) ServiceInfo + func (info *ServiceInfo) Compare(target ServiceInfo) bool + func (info *ServiceInfo) ConsulAgentServiceRegistration() *api.AgentServiceRegistration + type ServiceInfoStatus struct + Added ServiceInfos + Removed ServiceInfos + type ServiceInfos map[string]ServiceInfo + func (existing ServiceInfos) Diff(discovered ServiceInfos) ServiceInfoStatus + type Tags []string + func NewTags(from string) Tags + func (t Tags) Compare(tags Tags) bool