mirror of
https://github.com/go-micro/go-micro.git
synced 2025-11-29 21:47:44 +02:00
fix: some linting issues (#2563)
This commit is contained in:
@@ -8,15 +8,15 @@ import (
|
||||
var (
|
||||
DefaultRegistry = NewRegistry()
|
||||
|
||||
// Not found error when GetService is called
|
||||
// Not found error when GetService is called.
|
||||
ErrNotFound = errors.New("service not found")
|
||||
// Watcher stopped error when watcher is stopped
|
||||
// Watcher stopped error when watcher is stopped.
|
||||
ErrWatcherStopped = errors.New("watcher stopped")
|
||||
)
|
||||
|
||||
// The registry provides an interface for service discovery
|
||||
// and an abstraction over varying implementations
|
||||
// {consul, etcd, zookeeper, ...}
|
||||
// {consul, etcd, zookeeper, ...}.
|
||||
type Registry interface {
|
||||
Init(...Option) error
|
||||
Options() Options
|
||||
@@ -72,7 +72,7 @@ func Register(s *Service, opts ...RegisterOption) error {
|
||||
return DefaultRegistry.Register(s, opts...)
|
||||
}
|
||||
|
||||
// Deregister a service node
|
||||
// Deregister a service node.
|
||||
func Deregister(s *Service) error {
|
||||
return DefaultRegistry.Deregister(s)
|
||||
}
|
||||
@@ -82,7 +82,7 @@ func GetService(name string) ([]*Service, error) {
|
||||
return DefaultRegistry.GetService(name)
|
||||
}
|
||||
|
||||
// List the services. Only returns service names
|
||||
// List the services. Only returns service names.
|
||||
func ListServices() ([]*Service, error) {
|
||||
return DefaultRegistry.ListServices()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user