Skip to content

Commit 5dc7356

Browse files
authored
Merge pull request #43 from gatewayd-io/remove-gocache
Remove `gocache`
2 parents 04e77dc + 8f77972 commit 5dc7356

5 files changed

Lines changed: 14 additions & 72 deletions

File tree

go.mod

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ go 1.20
44

55
require (
66
github.com/alicebob/miniredis/v2 v2.30.1
7-
github.com/eko/gocache/lib/v4 v4.1.3
8-
github.com/eko/gocache/store/redis/v4 v4.1.2
97
github.com/gatewayd-io/gatewayd-plugin-sdk v0.0.16
108
github.com/go-co-op/gocron v1.18.1
119
github.com/go-redis/redis/v8 v8.11.5
@@ -28,7 +26,6 @@ require (
2826
github.com/davecgh/go-spew v1.1.1 // indirect
2927
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
3028
github.com/fatih/color v1.14.1 // indirect
31-
github.com/golang/mock v1.6.0 // indirect
3229
github.com/golang/protobuf v1.5.3 // indirect
3330
github.com/hashicorp/yamux v0.1.1 // indirect
3431
github.com/mattn/go-colorable v0.1.13 // indirect
@@ -42,7 +39,6 @@ require (
4239
github.com/prometheus/procfs v0.9.0 // indirect
4340
github.com/robfig/cron/v3 v3.0.1 // indirect
4441
github.com/yuin/gopher-lua v1.1.0 // indirect
45-
golang.org/x/exp v0.0.0-20230307190834-24139beb5833 // indirect
4642
golang.org/x/net v0.8.0 // indirect
4743
golang.org/x/sync v0.1.0 // indirect
4844
golang.org/x/sys v0.6.0 // indirect

go.sum

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
1414
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1515
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
1616
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
17-
github.com/eko/gocache/lib/v4 v4.1.3 h1:i7xVxWWhAESLAcHgp73piJtST63TS7ThFD7LE78vmXc=
18-
github.com/eko/gocache/lib/v4 v4.1.3/go.mod h1:7uSUlaDeRgr17IYCV8kSluhRDXq4SGutWWxTpxpwW3w=
19-
github.com/eko/gocache/store/redis/v4 v4.1.2 h1:PtpjQu8Q698kpC3H06As5As15s+hJofV8NtkddVX5aQ=
20-
github.com/eko/gocache/store/redis/v4 v4.1.2/go.mod h1:P2HeqvNwqkdwajYro+qwBWquhdYpN0LgfH2rJ3jK7yg=
2117
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
2218
github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w=
2319
github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg=
@@ -29,8 +25,6 @@ github.com/go-co-op/gocron v1.18.1 h1:erHHbIIav46xAV54lnyKKjrKLP+2RgjuDsbwGamBEv
2925
github.com/go-co-op/gocron v1.18.1/go.mod h1:UqVyvM90I1q/R1qGEX6cBORI6WArLuEgYlbncLMvzRM=
3026
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
3127
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
32-
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
33-
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
3428
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
3529
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
3630
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
@@ -104,54 +98,29 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F
10498
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
10599
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
106100
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
107-
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
108101
github.com/yuin/gopher-lua v1.1.0 h1:BojcDhfyDWgU2f2TOzYK/g5p2gxMrku8oupLDqlnSqE=
109102
github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw=
110103
github.com/zenizh/go-capturer v0.0.0-20211219060012-52ea6c8fed04 h1:qXafrlZL1WsJW5OokjraLLRURHiw0OzKHD/RNdspp4w=
111104
github.com/zenizh/go-capturer v0.0.0-20211219060012-52ea6c8fed04/go.mod h1:FiwNQxz6hGoNFBC4nIx+CxZhI3nne5RmIOlT/MXcSD4=
112105
go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
113-
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
114-
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
115106
golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc=
116-
golang.org/x/exp v0.0.0-20230307190834-24139beb5833 h1:SChBja7BCQewoTAU7IgvucQKMIXrEpFxNMs0spT3/5s=
117-
golang.org/x/exp v0.0.0-20230307190834-24139beb5833/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
118-
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
119-
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
120-
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
121-
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
122107
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
123108
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
124109
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
125-
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
126-
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
127110
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
128111
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
129112
golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
130-
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
131-
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
132113
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
133114
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
134-
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
135-
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
136-
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
137115
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
138116
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
139117
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
140118
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
141119
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
142120
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
143-
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
144-
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
145-
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
146121
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
147122
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
148-
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
149-
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
150-
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
151-
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
152-
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
153123
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
154-
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
155124
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA=
156125
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s=
157126
google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc=

main.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"flag"
66
"os"
77

8-
redisStore "github.com/eko/gocache/store/redis/v4"
98
"github.com/gatewayd-io/gatewayd-plugin-cache/plugin"
109
sdkConfig "github.com/gatewayd-io/gatewayd-plugin-sdk/config"
1110
"github.com/gatewayd-io/gatewayd-plugin-sdk/logging"
@@ -56,14 +55,10 @@ func main() {
5655
// Ping the Redis server to check if it is available.
5756
_, err = pluginInstance.Impl.RedisClient.Ping(context.Background()).Result()
5857
if err != nil {
59-
logger.Error("Failed to ping Redis server", "error", err)
58+
logger.Error("Failed to ping Redis server, plugin exited", "error", err)
6059
os.Exit(1)
6160
}
6261

63-
pluginInstance.Impl.RedisStore = redisStore.NewRedis(
64-
pluginInstance.Impl.RedisClient,
65-
)
66-
6762
pluginInstance.Impl.PeriodicInvalidatorEnabled = cast.ToBool(
6863
cfg["periodicInvalidatorEnabled"])
6964
pluginInstance.Impl.PeriodicInvalidatorStartDelay = cast.ToDuration(

plugin/plugin.go

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ import (
66
"strings"
77
"time"
88

9-
"github.com/eko/gocache/lib/v4/cache"
10-
"github.com/eko/gocache/lib/v4/store"
11-
"github.com/eko/gocache/store/redis/v4"
129
"github.com/gatewayd-io/gatewayd-plugin-sdk/databases/postgres"
1310
sdkPlugin "github.com/gatewayd-io/gatewayd-plugin-sdk/plugin"
1411
v1 "github.com/gatewayd-io/gatewayd-plugin-sdk/plugin/v1"
@@ -28,7 +25,6 @@ type Plugin struct {
2825

2926
// Cache configuration.
3027
RedisClient *goRedis.Client
31-
RedisStore *redis.RedisStore
3228
RedisURL string
3329
Expiry time.Duration
3430
DefaultDBName string
@@ -76,8 +72,6 @@ func (p *Plugin) GetPluginConfig(
7672
func (p *Plugin) OnTrafficFromClient(
7773
ctx context.Context, req *structpb.Struct,
7874
) (*structpb.Struct, error) {
79-
cacheManager := cache.New[string](p.RedisStore)
80-
8175
req, err := postgres.HandleClientMessage(req, p.Logger)
8276
if err != nil {
8377
p.Logger.Info("Failed to handle client message", "error", err)
@@ -87,12 +81,12 @@ func (p *Plugin) OnTrafficFromClient(
8781
database := p.DefaultDBName
8882
if database == "" {
8983
client := cast.ToStringMapString(sdkPlugin.GetAttr(req, "client", nil))
90-
database = p.getDBFromStartupMessage(ctx, req, cacheManager, database, client)
84+
database = p.getDBFromStartupMessage(ctx, req, database, client)
9185

9286
// Get the database from the cache if it's not found in the startup message or
9387
// if the current request is not a startup message.
9488
if database == "" {
95-
database, err = cacheManager.Get(ctx, client["remote"])
89+
database, err = p.RedisClient.Get(ctx, client["remote"]).Result()
9690
if err != nil {
9791
CacheMissesCounter.Inc()
9892
p.Logger.Debug("Failed to get cache", "error", err)
@@ -128,7 +122,7 @@ func (p *Plugin) OnTrafficFromClient(
128122
p.invalidateDML(ctx, query)
129123

130124
// Check if the query is cached.
131-
response, err := cacheManager.Get(ctx, cacheKey)
125+
response, err := p.RedisClient.Get(ctx, cacheKey).Result()
132126
if err != nil {
133127
CacheMissesCounter.Inc()
134128
p.Logger.Debug("Failed to get cached response", "error", err)
@@ -153,8 +147,6 @@ func (p *Plugin) OnTrafficFromClient(
153147
func (p *Plugin) OnTrafficFromServer(
154148
ctx context.Context, resp *structpb.Struct,
155149
) (*structpb.Struct, error) {
156-
cacheManager := cache.New[string](p.RedisStore)
157-
158150
resp, err := postgres.HandleServerMessage(resp, p.Logger)
159151
if err != nil {
160152
p.Logger.Info("Failed to handle server message", "error", err)
@@ -172,7 +164,7 @@ func (p *Plugin) OnTrafficFromServer(
172164
if database == "" {
173165
client := cast.ToStringMapString(sdkPlugin.GetAttr(resp, "client", ""))
174166
if client != nil && client["remote"] != "" {
175-
database, err = cacheManager.Get(ctx, client["remote"])
167+
database, err = p.RedisClient.Get(ctx, client["remote"]).Result()
176168
if err != nil {
177169
CacheMissesCounter.Inc()
178170
p.Logger.Debug("Failed to get cached response", "error", err)
@@ -191,16 +183,9 @@ func (p *Plugin) OnTrafficFromServer(
191183
}
192184

193185
cacheKey := strings.Join([]string{server["remote"], database, request}, ":")
194-
195-
options := []store.Option{}
196-
if p.Expiry.Seconds() > 0 {
197-
p.Logger.Debug("Key expiry is set", "expiry", p.Expiry)
198-
options = append(options, store.WithExpiration(p.Expiry))
199-
}
200-
201186
if errorResponse == "" && rowDescription != "" && dataRow != nil && len(dataRow) > 0 {
202187
// The request was successful and the response contains data. Cache the response.
203-
if err := cacheManager.Set(ctx, cacheKey, response, options...); err != nil {
188+
if err := p.RedisClient.Set(ctx, cacheKey, response, p.Expiry).Err(); err != nil {
204189
CacheMissesCounter.Inc()
205190
p.Logger.Debug("Failed to set cache", "error", err)
206191
}
@@ -223,8 +208,8 @@ func (p *Plugin) OnTrafficFromServer(
223208
// the cache when a rows is inserted, updated or deleted into that table.
224209
for _, table := range tables {
225210
requestQueryCacheKey := strings.Join([]string{table, cacheKey}, ":")
226-
if err := cacheManager.Set(
227-
ctx, requestQueryCacheKey, "", options...); err != nil {
211+
if err := p.RedisClient.Set(
212+
ctx, requestQueryCacheKey, "", p.Expiry).Err(); err != nil {
228213
CacheMissesCounter.Inc()
229214
p.Logger.Debug("Failed to set cache", "error", err)
230215
}
@@ -236,10 +221,9 @@ func (p *Plugin) OnTrafficFromServer(
236221
}
237222

238223
func (p *Plugin) OnClosed(ctx context.Context, req *structpb.Struct) (*structpb.Struct, error) {
239-
cacheManager := cache.New[string](p.RedisStore)
240224
client := cast.ToStringMapString(sdkPlugin.GetAttr(req, "client", nil))
241225
if client != nil {
242-
if err := cacheManager.Delete(ctx, client["remote"]); err != nil {
226+
if err := p.RedisClient.Del(ctx, client["remote"]).Err(); err != nil {
243227
p.Logger.Debug("Failed to delete cache", "error", err)
244228
CacheMissesCounter.Inc()
245229
}
@@ -326,7 +310,6 @@ func (p *Plugin) invalidateDML(ctx context.Context, query string) {
326310
func (p *Plugin) getDBFromStartupMessage(
327311
ctx context.Context,
328312
req *structpb.Struct,
329-
cacheManager *cache.Cache[string],
330313
database string,
331314
client map[string]string,
332315
) string {
@@ -350,8 +333,11 @@ func (p *Plugin) getDBFromStartupMessage(
350333
if startupMsgParams != nil &&
351334
startupMsgParams["database"] != "" &&
352335
client["remote"] != "" {
353-
if err := cacheManager.Set(
354-
ctx, client["remote"], startupMsgParams["database"]); err != nil {
336+
if err := p.RedisClient.Set(
337+
ctx, client["remote"],
338+
startupMsgParams["database"],
339+
time.Duration(0),
340+
).Err(); err != nil {
355341
CacheMissesCounter.Inc()
356342
p.Logger.Debug("Failed to set cache", "error", err)
357343
}

plugin/plugin_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"testing"
88

99
miniredis "github.com/alicebob/miniredis/v2"
10-
redisStore "github.com/eko/gocache/store/redis/v4"
1110
"github.com/gatewayd-io/gatewayd-plugin-sdk/logging"
1211
"github.com/go-redis/redis/v8"
1312
"github.com/hashicorp/go-hclog"
@@ -37,8 +36,6 @@ func Test_Plugin(t *testing.T) {
3736
assert.NotNil(t, redisConfig)
3837
redisClient := redis.NewClient(redisConfig)
3938
assert.NotNil(t, redisClient)
40-
redisStore := redisStore.NewRedis(redisClient)
41-
assert.NotNil(t, redisStore)
4239

4340
// Create and initialize a new plugin.
4441
logger := hclog.New(&hclog.LoggerOptions{
@@ -49,7 +46,6 @@ func Test_Plugin(t *testing.T) {
4946
Logger: logger,
5047
RedisURL: redisURL,
5148
RedisClient: redisClient,
52-
RedisStore: redisStore,
5349
})
5450
assert.NotNil(t, p)
5551

0 commit comments

Comments
 (0)