2021-01-16 03:00:25 +03:00
|
|
|
package redis
|
|
|
|
|
|
|
|
import (
|
2023-10-20 23:51:29 +03:00
|
|
|
"github.com/redis/go-redis/v9"
|
2021-10-27 23:29:16 +03:00
|
|
|
"go.unistack.org/micro/v3/store"
|
2021-01-16 03:00:25 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
type configKey struct{}
|
|
|
|
|
|
|
|
func Config(c *redis.Options) store.Option {
|
|
|
|
return store.SetOption(configKey{}, c)
|
|
|
|
}
|
|
|
|
|
|
|
|
type clusterConfigKey struct{}
|
|
|
|
|
|
|
|
func ClusterConfig(c *redis.ClusterOptions) store.Option {
|
|
|
|
return store.SetOption(clusterConfigKey{}, c)
|
|
|
|
}
|