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