micro-store-redis/options.go

19 lines
372 B
Go
Raw Normal View History

package redis
import (
"github.com/redis/go-redis/v9"
"go.unistack.org/micro/v4/options"
)
type configKey struct{}
func Config(c *redis.Options) options.Option {
return options.ContextOption(configKey{}, c)
}
type universalConfigKey struct{}
func UniversalConfig(c *redis.UniversalOptions) options.Option {
return options.ContextOption(universalConfigKey{}, c)
}