1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-08-10 21:52:01 +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

@@ -8,6 +8,7 @@ import (
)
type Options struct {
Addrs []string
Timeout time.Duration
Secure bool
TLSConfig *tls.Config
@@ -24,6 +25,13 @@ type RegisterOptions struct {
Context context.Context
}
// Addrs is the registry addresses to use
func Addrs(addrs ...string) Option {
return func(o *Options) {
o.Addrs = addrs
}
}
func Timeout(t time.Duration) Option {
return func(o *Options) {
o.Timeout = t