Compare commits
6 Commits
v3.10.10
...
21d40b8e69
| Author | SHA1 | Date | |
|---|---|---|---|
| 21d40b8e69 | |||
| c8d21b4ef4 | |||
| 195c604a31 | |||
| b263b69031 | |||
| 4459bfa1a0 | |||
| b90361e48a |
4
go.mod
4
go.mod
@@ -1,10 +1,10 @@
|
|||||||
module go.unistack.org/micro-store-redis/v3
|
module go.unistack.org/micro-store-redis/v4
|
||||||
|
|
||||||
go 1.20
|
go 1.20
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/redis/go-redis/v9 v9.2.1
|
github.com/redis/go-redis/v9 v9.2.1
|
||||||
go.unistack.org/micro/v3 v3.10.28
|
go.unistack.org/micro/v4 v4.0.7
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
|||||||
4
go.sum
4
go.sum
@@ -8,5 +8,5 @@ github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaR
|
|||||||
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
|
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
|
||||||
github.com/redis/go-redis/v9 v9.2.1 h1:WlYJg71ODF0dVspZZCpYmoF1+U1Jjk9Rwd7pq6QmlCg=
|
github.com/redis/go-redis/v9 v9.2.1 h1:WlYJg71ODF0dVspZZCpYmoF1+U1Jjk9Rwd7pq6QmlCg=
|
||||||
github.com/redis/go-redis/v9 v9.2.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M=
|
github.com/redis/go-redis/v9 v9.2.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M=
|
||||||
go.unistack.org/micro/v3 v3.10.28 h1:/87lGekrmi0/66pioy+Nh8lVUBBYnVqKoHiNYX5OmMI=
|
go.unistack.org/micro/v4 v4.0.7 h1:2lwtZlHcSwgkahhFbkI4x1lOS79lw8uLHtcEhlFF+AM=
|
||||||
go.unistack.org/micro/v3 v3.10.28/go.mod h1:eUgtvbtiiz6te93m0ZdmoecbitWwjdBmmr84srmEIKA=
|
go.unistack.org/micro/v4 v4.0.7/go.mod h1:bVEYTlPi0EsdgZZt311bIroDg9ict7ky3C87dSCCAGk=
|
||||||
|
|||||||
14
options.go
14
options.go
@@ -2,17 +2,11 @@ package redis
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/redis/go-redis/v9"
|
"github.com/redis/go-redis/v9"
|
||||||
"go.unistack.org/micro/v3/store"
|
"go.unistack.org/micro/v4/options"
|
||||||
)
|
)
|
||||||
|
|
||||||
type configKey struct{}
|
type universalConfigKey struct{}
|
||||||
|
|
||||||
func Config(c *redis.Options) store.Option {
|
func UniversalConfig(c *redis.UniversalOptions) options.Option {
|
||||||
return store.SetOption(configKey{}, c)
|
return options.ContextOption(universalConfigKey{}, c)
|
||||||
}
|
|
||||||
|
|
||||||
type clusterConfigKey struct{}
|
|
||||||
|
|
||||||
func ClusterConfig(c *redis.ClusterOptions) store.Option {
|
|
||||||
return store.SetOption(clusterConfigKey{}, c)
|
|
||||||
}
|
}
|
||||||
|
|||||||
127
redis.go
127
redis.go
@@ -8,45 +8,32 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/redis/go-redis/v9"
|
"github.com/redis/go-redis/v9"
|
||||||
"go.unistack.org/micro/v3/store"
|
"go.unistack.org/micro/v4/options"
|
||||||
|
"go.unistack.org/micro/v4/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Store struct {
|
type Store struct {
|
||||||
opts store.Options
|
opts store.Options
|
||||||
cli redisClient
|
cli redis.UniversalClient
|
||||||
}
|
|
||||||
|
|
||||||
type redisClient interface {
|
|
||||||
Get(ctx context.Context, key string) *redis.StringCmd
|
|
||||||
Del(ctx context.Context, keys ...string) *redis.IntCmd
|
|
||||||
Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.StatusCmd
|
|
||||||
Keys(ctx context.Context, pattern string) *redis.StringSliceCmd
|
|
||||||
MGet(ctx context.Context, keys ...string) *redis.SliceCmd
|
|
||||||
MSet(ctx context.Context, kv ...interface{}) *redis.StatusCmd
|
|
||||||
Exists(ctx context.Context, keys ...string) *redis.IntCmd
|
|
||||||
Ping(ctx context.Context) *redis.StatusCmd
|
|
||||||
Pipeline() redis.Pipeliner
|
|
||||||
Pipelined(ctx context.Context, fn func(redis.Pipeliner) error) ([]redis.Cmder, error)
|
|
||||||
Close() error
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Store) Connect(ctx context.Context) error {
|
func (r *Store) Connect(ctx context.Context) error {
|
||||||
return r.cli.Ping(ctx).Err()
|
return r.cli.Ping(ctx).Err()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Store) Init(opts ...store.Option) error {
|
func (r *Store) Init(opts ...options.Option) error {
|
||||||
for _, o := range opts {
|
return r.configure(opts...)
|
||||||
o(&r.opts)
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return r.configure()
|
func (r *Store) Redis() redis.UniversalClient {
|
||||||
|
return r.cli
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Store) Disconnect(ctx context.Context) error {
|
func (r *Store) Disconnect(ctx context.Context) error {
|
||||||
return r.cli.Close()
|
return r.cli.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Store) Exists(ctx context.Context, key string, opts ...store.ExistsOption) error {
|
func (r *Store) Exists(ctx context.Context, key string, opts ...options.Option) error {
|
||||||
if r.opts.Timeout > 0 {
|
if r.opts.Timeout > 0 {
|
||||||
var cancel context.CancelFunc
|
var cancel context.CancelFunc
|
||||||
ctx, cancel = context.WithTimeout(ctx, r.opts.Timeout)
|
ctx, cancel = context.WithTimeout(ctx, r.opts.Timeout)
|
||||||
@@ -69,7 +56,7 @@ func (r *Store) Exists(ctx context.Context, key string, opts ...store.ExistsOpti
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Store) Read(ctx context.Context, key string, val interface{}, opts ...store.ReadOption) error {
|
func (r *Store) Read(ctx context.Context, key string, val interface{}, opts ...options.Option) error {
|
||||||
if r.opts.Timeout > 0 {
|
if r.opts.Timeout > 0 {
|
||||||
var cancel context.CancelFunc
|
var cancel context.CancelFunc
|
||||||
ctx, cancel = context.WithTimeout(ctx, r.opts.Timeout)
|
ctx, cancel = context.WithTimeout(ctx, r.opts.Timeout)
|
||||||
@@ -95,7 +82,7 @@ func (r *Store) Read(ctx context.Context, key string, val interface{}, opts ...s
|
|||||||
return r.opts.Codec.Unmarshal(buf, val)
|
return r.opts.Codec.Unmarshal(buf, val)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Store) MRead(ctx context.Context, keys []string, vals interface{}, opts ...store.ReadOption) error {
|
func (r *Store) MRead(ctx context.Context, keys []string, vals interface{}, opts ...options.Option) error {
|
||||||
if len(keys) == 1 {
|
if len(keys) == 1 {
|
||||||
vt := reflect.ValueOf(vals)
|
vt := reflect.ValueOf(vals)
|
||||||
if vt.Kind() == reflect.Ptr {
|
if vt.Kind() == reflect.Ptr {
|
||||||
@@ -170,7 +157,7 @@ func (r *Store) MRead(ctx context.Context, keys []string, vals interface{}, opts
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Store) MDelete(ctx context.Context, keys []string, opts ...store.DeleteOption) error {
|
func (r *Store) MDelete(ctx context.Context, keys []string, opts ...options.Option) error {
|
||||||
if len(keys) == 1 {
|
if len(keys) == 1 {
|
||||||
return r.Delete(ctx, keys[0], opts...)
|
return r.Delete(ctx, keys[0], opts...)
|
||||||
}
|
}
|
||||||
@@ -192,7 +179,7 @@ func (r *Store) MDelete(ctx context.Context, keys []string, opts ...store.Delete
|
|||||||
return r.cli.Del(ctx, keys...).Err()
|
return r.cli.Del(ctx, keys...).Err()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Store) Delete(ctx context.Context, key string, opts ...store.DeleteOption) error {
|
func (r *Store) Delete(ctx context.Context, key string, opts ...options.Option) error {
|
||||||
if r.opts.Timeout > 0 {
|
if r.opts.Timeout > 0 {
|
||||||
var cancel context.CancelFunc
|
var cancel context.CancelFunc
|
||||||
ctx, cancel = context.WithTimeout(ctx, r.opts.Timeout)
|
ctx, cancel = context.WithTimeout(ctx, r.opts.Timeout)
|
||||||
@@ -208,7 +195,7 @@ func (r *Store) Delete(ctx context.Context, key string, opts ...store.DeleteOpti
|
|||||||
return r.cli.Del(ctx, fmt.Sprintf("%s%s", options.Namespace, key)).Err()
|
return r.cli.Del(ctx, fmt.Sprintf("%s%s", options.Namespace, key)).Err()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Store) MWrite(ctx context.Context, keys []string, vals []interface{}, opts ...store.WriteOption) error {
|
func (r *Store) MWrite(ctx context.Context, keys []string, vals []interface{}, opts ...options.Option) error {
|
||||||
if len(keys) == 1 {
|
if len(keys) == 1 {
|
||||||
return r.Write(ctx, keys[0], vals[0], opts...)
|
return r.Write(ctx, keys[0], vals[0], opts...)
|
||||||
}
|
}
|
||||||
@@ -246,8 +233,11 @@ func (r *Store) MWrite(ctx context.Context, keys []string, vals []interface{}, o
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmds, err := r.cli.Pipelined(ctx, func(pipe redis.Pipeliner) error {
|
cmds, err := r.cli.Pipelined(ctx, func(pipe redis.Pipeliner) error {
|
||||||
|
var err error
|
||||||
for idx := 0; idx < len(kvs); idx += 2 {
|
for idx := 0; idx < len(kvs); idx += 2 {
|
||||||
pipe.Set(ctx, kvs[idx], kvs[idx+1], options.TTL).Result()
|
if _, err = pipe.Set(ctx, kvs[idx], kvs[idx+1], options.TTL).Result(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
@@ -264,7 +254,7 @@ func (r *Store) MWrite(ctx context.Context, keys []string, vals []interface{}, o
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Store) Write(ctx context.Context, key string, val interface{}, opts ...store.WriteOption) error {
|
func (r *Store) Write(ctx context.Context, key string, val interface{}, opts ...options.Option) error {
|
||||||
if r.opts.Timeout > 0 {
|
if r.opts.Timeout > 0 {
|
||||||
var cancel context.CancelFunc
|
var cancel context.CancelFunc
|
||||||
ctx, cancel = context.WithTimeout(ctx, r.opts.Timeout)
|
ctx, cancel = context.WithTimeout(ctx, r.opts.Timeout)
|
||||||
@@ -297,7 +287,7 @@ func (r *Store) Write(ctx context.Context, key string, val interface{}, opts ...
|
|||||||
return r.cli.Set(ctx, key, buf, options.TTL).Err()
|
return r.cli.Set(ctx, key, buf, options.TTL).Err()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Store) List(ctx context.Context, opts ...store.ListOption) ([]string, error) {
|
func (r *Store) List(ctx context.Context, opts ...options.Option) ([]string, error) {
|
||||||
options := store.NewListOptions(opts...)
|
options := store.NewListOptions(opts...)
|
||||||
if len(options.Namespace) == 0 {
|
if len(options.Namespace) == 0 {
|
||||||
options.Namespace = r.opts.Namespace
|
options.Namespace = r.opts.Namespace
|
||||||
@@ -340,73 +330,42 @@ func (r *Store) String() string {
|
|||||||
return "redis"
|
return "redis"
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewStore(opts ...store.Option) *Store {
|
func NewStore(opts ...options.Option) *Store {
|
||||||
return &Store{opts: store.NewOptions(opts...)}
|
return &Store{opts: store.NewOptions(opts...)}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Store) configure() error {
|
func (r *Store) configure(opts ...options.Option) error {
|
||||||
var redisOptions *redis.Options
|
if r.cli != nil && len(opts) == 0 {
|
||||||
var redisClusterOptions *redis.ClusterOptions
|
return nil
|
||||||
var err error
|
|
||||||
|
|
||||||
nodes := r.opts.Addrs
|
|
||||||
|
|
||||||
if len(nodes) == 0 {
|
|
||||||
nodes = []string{"redis://127.0.0.1:6379"}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.cli != nil && r.opts.Context == nil {
|
var redisUniversalOptions *redis.UniversalOptions
|
||||||
return nil
|
var err error
|
||||||
|
|
||||||
|
for _, o := range opts {
|
||||||
|
if err = o(r.opts); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.opts.Context != nil {
|
if r.opts.Context != nil {
|
||||||
if c, ok := r.opts.Context.Value(configKey{}).(*redis.Options); ok {
|
if c, ok := r.opts.Context.Value(universalConfigKey{}).(*redis.UniversalOptions); ok {
|
||||||
redisOptions = c
|
redisUniversalOptions = c
|
||||||
if r.opts.TLSConfig != nil {
|
if r.opts.TLSConfig != nil {
|
||||||
redisOptions.TLSConfig = r.opts.TLSConfig
|
redisUniversalOptions.TLSConfig = r.opts.TLSConfig
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if c, ok := r.opts.Context.Value(clusterConfigKey{}).(*redis.ClusterOptions); ok {
|
|
||||||
redisClusterOptions = c
|
|
||||||
if r.opts.TLSConfig != nil {
|
|
||||||
redisClusterOptions.TLSConfig = r.opts.TLSConfig
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if redisOptions != nil && redisClusterOptions != nil {
|
if redisUniversalOptions == nil && r.cli != nil {
|
||||||
return fmt.Errorf("must specify only one option Config or ClusterConfig")
|
|
||||||
}
|
|
||||||
|
|
||||||
if redisOptions == nil && redisClusterOptions == nil && r.cli != nil {
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if redisOptions == nil && redisClusterOptions == nil && len(nodes) == 1 {
|
if redisUniversalOptions == nil {
|
||||||
redisOptions, err = redis.ParseURL(nodes[0])
|
redisUniversalOptions = &redis.UniversalOptions{
|
||||||
if err != nil {
|
|
||||||
// Backwards compatibility
|
|
||||||
redisOptions = &redis.Options{
|
|
||||||
Addr: nodes[0],
|
|
||||||
Username: "",
|
|
||||||
Password: "", // no password set
|
|
||||||
DB: 0, // use default DB
|
|
||||||
MaxRetries: 2,
|
|
||||||
MaxRetryBackoff: 256 * time.Millisecond,
|
|
||||||
DialTimeout: 1 * time.Second,
|
|
||||||
ReadTimeout: 1 * time.Second,
|
|
||||||
WriteTimeout: 1 * time.Second,
|
|
||||||
PoolTimeout: 1 * time.Second,
|
|
||||||
MinIdleConns: 10,
|
|
||||||
TLSConfig: r.opts.TLSConfig,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if redisOptions == nil && redisClusterOptions == nil && len(nodes) > 1 {
|
|
||||||
redisClusterOptions = &redis.ClusterOptions{
|
|
||||||
Addrs: nodes,
|
|
||||||
Username: "",
|
Username: "",
|
||||||
Password: "", // no password set
|
Password: "", // no password set
|
||||||
|
DB: 0, // use default DB
|
||||||
MaxRetries: 2,
|
MaxRetries: 2,
|
||||||
MaxRetryBackoff: 256 * time.Millisecond,
|
MaxRetryBackoff: 256 * time.Millisecond,
|
||||||
DialTimeout: 1 * time.Second,
|
DialTimeout: 1 * time.Second,
|
||||||
@@ -418,11 +377,13 @@ func (r *Store) configure() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if redisOptions != nil {
|
if len(r.opts.Address) > 0 {
|
||||||
r.cli = redis.NewClient(redisOptions)
|
redisUniversalOptions.Addrs = r.opts.Address
|
||||||
} else if redisClusterOptions != nil {
|
} else if len(redisUniversalOptions.Addrs) == 0 {
|
||||||
r.cli = redis.NewClusterClient(redisClusterOptions)
|
redisUniversalOptions.Addrs = []string{"redis://127.0.0.1:6379"}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
r.cli = redis.NewUniversalClient(redisUniversalOptions)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/redis/go-redis/v9"
|
"github.com/redis/go-redis/v9"
|
||||||
"go.unistack.org/micro/v3/store"
|
"go.unistack.org/micro/v4/options"
|
||||||
|
"go.unistack.org/micro/v4/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_rkv_configure(t *testing.T) {
|
func Test_rkv_configure(t *testing.T) {
|
||||||
@@ -37,7 +38,7 @@ func Test_rkv_configure(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "legacy Url", fields: fields{options: store.Options{Addrs: []string{"127.0.0.1:6379"}}, Client: nil},
|
name: "legacy Url", fields: fields{options: store.Options{Address: []string{"127.0.0.1:6379"}}, Client: nil},
|
||||||
wantErr: false, want: wantValues{
|
wantErr: false, want: wantValues{
|
||||||
username: "",
|
username: "",
|
||||||
password: "",
|
password: "",
|
||||||
@@ -45,7 +46,7 @@ func Test_rkv_configure(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "New Url", fields: fields{options: store.Options{Addrs: []string{"redis://127.0.0.1:6379"}}, Client: nil},
|
name: "New Url", fields: fields{options: store.Options{Address: []string{"redis://127.0.0.1:6379"}}, Client: nil},
|
||||||
wantErr: false, want: wantValues{
|
wantErr: false, want: wantValues{
|
||||||
username: "",
|
username: "",
|
||||||
password: "",
|
password: "",
|
||||||
@@ -53,7 +54,7 @@ func Test_rkv_configure(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Url with Pwd", fields: fields{options: store.Options{Addrs: []string{"redis://:password@redis:6379"}}, Client: nil},
|
name: "Url with Pwd", fields: fields{options: store.Options{Address: []string{"redis://:password@redis:6379"}}, Client: nil},
|
||||||
wantErr: false, want: wantValues{
|
wantErr: false, want: wantValues{
|
||||||
username: "",
|
username: "",
|
||||||
password: "password",
|
password: "password",
|
||||||
@@ -61,7 +62,7 @@ func Test_rkv_configure(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Url with username and Pwd", fields: fields{options: store.Options{Addrs: []string{"redis://username:password@redis:6379"}}, Client: nil},
|
name: "Url with username and Pwd", fields: fields{options: store.Options{Address: []string{"redis://username:password@redis:6379"}}, Client: nil},
|
||||||
wantErr: false, want: wantValues{
|
wantErr: false, want: wantValues{
|
||||||
username: "username",
|
username: "username",
|
||||||
password: "password",
|
password: "password",
|
||||||
@@ -71,11 +72,11 @@ func Test_rkv_configure(t *testing.T) {
|
|||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
r := &rkv{
|
rc := &Store{
|
||||||
opts: tt.fields.options,
|
opts: tt.fields.options,
|
||||||
cli: tt.fields.Client,
|
cli: tt.fields.Client,
|
||||||
}
|
}
|
||||||
err := r.configure()
|
err := rc.configure()
|
||||||
if (err != nil) != tt.wantErr {
|
if (err != nil) != tt.wantErr {
|
||||||
t.Errorf("configure() error = %v, wantErr %v", err, tt.wantErr)
|
t.Errorf("configure() error = %v, wantErr %v", err, tt.wantErr)
|
||||||
return
|
return
|
||||||
@@ -90,7 +91,7 @@ func Test_Store(t *testing.T) {
|
|||||||
if tr := os.Getenv("INTEGRATION_TESTS"); len(tr) > 0 {
|
if tr := os.Getenv("INTEGRATION_TESTS"); len(tr) > 0 {
|
||||||
t.Skip()
|
t.Skip()
|
||||||
}
|
}
|
||||||
r := NewStore(store.Addrs(os.Getenv("STORE_NODES")))
|
r := NewStore(options.Address(os.Getenv("STORE_NODES")))
|
||||||
|
|
||||||
if err := r.Init(); err != nil {
|
if err := r.Init(); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
@@ -130,7 +131,7 @@ func Test_MRead(t *testing.T) {
|
|||||||
if tr := os.Getenv("INTEGRATION_TESTS"); len(tr) > 0 {
|
if tr := os.Getenv("INTEGRATION_TESTS"); len(tr) > 0 {
|
||||||
t.Skip()
|
t.Skip()
|
||||||
}
|
}
|
||||||
r := NewStore(store.Addrs(os.Getenv("STORE_NODES")))
|
r := NewStore(options.Address(os.Getenv("STORE_NODES")))
|
||||||
|
|
||||||
if err = r.Init(); err != nil {
|
if err = r.Init(); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user