Versions in this module Expand all Collapse all v1 v1.0.1 Mar 16, 2023 Changes in this version + const SOH + var BaseDirectory = "/discovery" + var BaseZnodePath = func(environment Environment, service string) string + var DefaultZKTimeout = 5 * time.Second + var MemberPrefix = "member_" + type Endpoint struct + CloseEvent chan struct{} + PingRate time.Duration + func (ep *Endpoint) Close() + type Environment string + const Local + const Production + const Staging + const Test + type ServerSet struct + ZKTimeout time.Duration + func New(environment Environment, service string, zookeepers []string) *ServerSet + func (ss *ServerSet) RegisterEndpoint(host string, port int, ping func() error) (*Endpoint, error) + func (ss *ServerSet) Watch() (*Watch, error) + func (ss *ServerSet) ZookeeperServers() []string + type Watch struct + EventCount int + LastEvent time.Time + func (w *Watch) Close() + func (w *Watch) Endpoints() []string + func (w *Watch) Event() <-chan struct{} + func (w *Watch) IsClosed() bool