Skip to content

Commit

Permalink
Remove deprecated redis package
Browse files Browse the repository at this point in the history
Fixes: #75
Signed-off-by: Heathcliff <[email protected]>
  • Loading branch information
heathcliff26 committed Dec 12, 2024
1 parent 4377127 commit 86c2857
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 601 deletions.
2 changes: 0 additions & 2 deletions examples/example-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ storage:
# etcd: Use etcd database
# kubernetes: Use kubernetes leases
#
# redis: DEPRECATED, use valkey instead. This option will be removed in a future release in 2025
#
# Default: memory
#
type: memory
Expand Down
4 changes: 0 additions & 4 deletions pkg/lock-manager/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import (
"github.com/heathcliff26/fleetlock/pkg/lock-manager/errors"
"github.com/heathcliff26/fleetlock/pkg/lock-manager/storage/etcd"
"github.com/heathcliff26/fleetlock/pkg/lock-manager/storage/kubernetes"

//nolint:staticcheck
"github.com/heathcliff26/fleetlock/pkg/lock-manager/storage/redis"
"github.com/heathcliff26/fleetlock/pkg/lock-manager/storage/sql"
"github.com/heathcliff26/fleetlock/pkg/lock-manager/storage/valkey"
)
Expand All @@ -17,7 +14,6 @@ type StorageConfig struct {
Postgres sql.PostgresConfig `yaml:"postgres,omitempty"`
MySQL sql.MySQLConfig `yaml:"mysql,omitempty"`
Valkey valkey.ValkeyConfig `yaml:"valkey,omitempty"`
Redis redis.RedisConfig `yaml:"redis,omitempty"`
Etcd etcd.EtcdConfig `yaml:"etcd,omitempty"`
Kubernetes kubernetes.KubernetesConfig `yaml:"kubernetes,omitempty"`
}
Expand Down
6 changes: 0 additions & 6 deletions pkg/lock-manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ import (
"github.com/heathcliff26/fleetlock/pkg/lock-manager/storage/etcd"
"github.com/heathcliff26/fleetlock/pkg/lock-manager/storage/kubernetes"
"github.com/heathcliff26/fleetlock/pkg/lock-manager/storage/memory"

//nolint:staticcheck
"github.com/heathcliff26/fleetlock/pkg/lock-manager/storage/redis"
"github.com/heathcliff26/fleetlock/pkg/lock-manager/storage/sql"
"github.com/heathcliff26/fleetlock/pkg/lock-manager/storage/valkey"
"github.com/heathcliff26/fleetlock/pkg/lock-manager/types"
Expand Down Expand Up @@ -64,9 +61,6 @@ func NewManager(groups Groups, storageCfg StorageConfig) (*LockManager, error) {
storage, err = sql.NewPostgresBackend(storageCfg.Postgres)
case "mysql":
storage, err = sql.NewMySQLBackend(storageCfg.MySQL)
case "redis":
//nolint:staticcheck
storage, err = redis.NewRedisBackend(storageCfg.Redis)
case "valkey":
storage, err = valkey.NewValkeyBackend(storageCfg.Valkey)
case "etcd":
Expand Down
27 changes: 0 additions & 27 deletions pkg/lock-manager/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ import (
"github.com/alicebob/miniredis/v2"
"github.com/heathcliff26/fleetlock/pkg/lock-manager/storage/etcd"
"github.com/heathcliff26/fleetlock/pkg/lock-manager/storage/kubernetes"

//nolint:staticcheck
"github.com/heathcliff26/fleetlock/pkg/lock-manager/storage/redis"
"github.com/heathcliff26/fleetlock/pkg/lock-manager/storage/sql"
"github.com/heathcliff26/fleetlock/pkg/lock-manager/storage/valkey"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -85,30 +82,6 @@ func TestNewManager(t *testing.T) {
},
Error: "failed to open mysql database",
},
{
Name: "RedisBackend",
Storage: StorageConfig{
Type: "redis",
Redis: redis.RedisConfig{
Addr: mr.Addr(),
},
},
Result: result{
groups: initGroups(NewDefaultGroups()),
storage: "*redis.RedisBackend",
},
Error: "",
},
{
Name: "ErrorNewRedisBackend",
Storage: StorageConfig{
Type: "redis",
Redis: redis.RedisConfig{
Addr: "",
},
},
Error: "no alive address in InitAddress",
},
{
Name: "ValkeyBackend",
Storage: StorageConfig{
Expand Down
129 changes: 0 additions & 129 deletions pkg/lock-manager/storage/redis/loadbalancer.go

This file was deleted.

144 changes: 0 additions & 144 deletions pkg/lock-manager/storage/redis/loadbalancer_test.go

This file was deleted.

Loading

0 comments on commit 86c2857

Please sign in to comment.