Vasiliy Tolstov
7ae302d438
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org> Reviewed-on: #108
19 lines
346 B
Go
19 lines
346 B
Go
package redis
|
|
|
|
import (
|
|
"github.com/redis/go-redis/v9"
|
|
"go.unistack.org/micro/v3/store"
|
|
)
|
|
|
|
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)
|
|
}
|