We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5361d6e commit 4e59e2fCopy full SHA for 4e59e2f
internal/sms-gateway/pubsub/pubsub.go
@@ -4,7 +4,6 @@ import (
4
"fmt"
5
"net/url"
6
7
- "github.com/android-sms-gateway/core/redis"
8
"github.com/android-sms-gateway/server/pkg/pubsub"
9
)
10
@@ -31,11 +30,11 @@ func New(config Config) (PubSub, error) {
31
30
case "memory":
32
return pubsub.NewMemory(opts...), nil
33
case "redis":
34
- client, err := redis.New(redis.Config{URL: config.URL})
35
- if err != nil {
36
- return nil, fmt.Errorf("can't create redis client: %w", err)
37
- }
38
- return pubsub.NewRedis(client, topicPrefix, opts...), nil
+ return pubsub.NewRedis(pubsub.RedisConfig{
+ Client: nil,
+ URL: config.URL,
+ Prefix: topicPrefix,
+ }, opts...)
39
default:
40
return nil, fmt.Errorf("invalid scheme: %s", u.Scheme)
41
}
0 commit comments