micro-store-redis/options.go
Vasiliy Tolstov b90361e48a add MWrite func
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-10-21 00:57:12 +03:00

19 lines
364 B
Go

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 clusterConfigKey struct{}
func ClusterConfig(c *redis.ClusterOptions) options.Option {
return options.ContextOption(clusterConfigKey{}, c)
}