Set MDNS as default registry

This commit is contained in:
Asim Aslam
2019-01-15 16:50:37 +00:00
parent 00661f8a99
commit 7314af347b
18 changed files with 1183 additions and 1194 deletions

View File

@@ -26,7 +26,7 @@ type RegisterOption func(*RegisterOptions)
type WatchOption func(*WatchOptions)
var (
DefaultRegistry = newConsulRegistry()
DefaultRegistry = NewRegistry()
// Not found error when GetService is called
ErrNotFound = errors.New("not found")
@@ -34,10 +34,6 @@ var (
ErrWatcherStopped = errors.New("watcher stopped")
)
func NewRegistry(opts ...Option) Registry {
return newConsulRegistry(opts...)
}
// Register a service node. Additionally supply options such as TTL.
func Register(s *Service, opts ...RegisterOption) error {
return DefaultRegistry.Register(s, opts...)