Versions in this module Expand all Collapse all v1 v1.0.1 Nov 8, 2024 v1.0.0 Nov 7, 2024 Changes in this version + type RedisStorage struct + func NewRedisStorage(addr, password string, db int) *RedisStorage + func (s *RedisStorage) GetAll(ctx context.Context) ([]*model.Proxy, error) + func (s *RedisStorage) GetRandom(ctx context.Context) (*model.Proxy, error) + func (s *RedisStorage) GetRedisClient() *redis.Client + func (s *RedisStorage) Remove(ctx context.Context, key string) error + func (s *RedisStorage) Save(ctx context.Context, proxy *model.Proxy) error + func (s *RedisStorage) UpdateScore(ctx context.Context, key string, score int) error + type Storage interface + GetAll func(context.Context) ([]*model.Proxy, error) + GetRandom func(context.Context) (*model.Proxy, error) + Remove func(context.Context, string) error + Save func(context.Context, *model.Proxy) error + UpdateScore func(context.Context, string, int) error