micro-register-gossip/options.go

16 lines
260 B
Go
Raw Normal View History

package gossip
import (
2018-03-03 15:28:44 +03:00
"context"
2018-03-03 15:28:44 +03:00
"github.com/micro/go-micro/registry"
)
type contextSecretKey struct{}
func SecretKey(k []byte) registry.Option {
return func(o *registry.Options) {
o.Context = context.WithValue(o.Context, contextSecretKey{}, k)
}
}