Documentation ¶ Index ¶ func NewRegistrar(cfg *Config) (registry.Registrar, error) type Config type Registrar func (r *Registrar) Close() func (r *Registrar) Register(service *registry.ServiceInfo) error func (r *Registrar) Unregister(service *registry.ServiceInfo) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func NewRegistrar ¶ func NewRegistrar(cfg *Config) (registry.Registrar, error) Types ¶ type Config ¶ type Config struct { ConsulCfg *consul.Config RegistryDir string Ttl time.Duration } type Registrar ¶ type Registrar struct { sync.RWMutex // contains filtered or unexported fields } func (*Registrar) Close ¶ func (r *Registrar) Close() func (*Registrar) Register ¶ func (r *Registrar) Register(service *registry.ServiceInfo) error func (*Registrar) Unregister ¶ func (r *Registrar) Unregister(service *registry.ServiceInfo) error Source Files ¶ View all Source files registrar.go Click to show internal directories. Click to hide internal directories.