1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-08-10 21:52:01 +02:00

Replace map[string]string with Context for extra options. map[string]string is essentially useless. Context can store anything

This commit is contained in:
Asim
2016-01-06 16:25:12 +00:00
parent f467902304
commit 8bf72a3325
8 changed files with 64 additions and 31 deletions

View File

@@ -2,13 +2,16 @@ package registry
import (
"time"
"golang.org/x/net/context"
)
type Options struct {
Timeout time.Duration
// Other options to be used by registry implementations
Options map[string]string
// Other options for implementations of the interface
// can be stored in a context
Context context.Context
}
func Timeout(t time.Duration) Option {