1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-11-29 21:47:44 +02:00

Registry init

This commit is contained in:
Asim
2016-03-15 22:20:21 +00:00
parent 64220dc0c5
commit f088074f29
6 changed files with 28 additions and 20 deletions

View File

@@ -21,13 +21,13 @@ type Option func(*Options)
type RegisterOption func(*RegisterOptions)
var (
DefaultRegistry = newConsulRegistry([]string{})
DefaultRegistry = newConsulRegistry()
ErrNotFound = errors.New("not found")
)
func NewRegistry(addrs []string, opt ...Option) Registry {
return newConsulRegistry(addrs, opt...)
func NewRegistry(opts ...Option) Registry {
return newConsulRegistry(opts...)
}
// Register a service node. Additionally supply options such as TTL.