bouncer/internal/setup/proxy_repository.go
William Petit f37425018b
All checks were successful
Cadoles/bouncer/pipeline/head This commit looks good
feat: use shared redis client to maximize pooling usage (#39)
2024-09-23 15:16:30 +02:00

18 lines
643 B
Go

package setup
import (
"context"
"forge.cadoles.com/cadoles/bouncer/internal/store"
redisStore "forge.cadoles.com/cadoles/bouncer/internal/store/redis"
"github.com/redis/go-redis/v9"
)
func NewProxyRepository(ctx context.Context, client redis.UniversalClient) (store.ProxyRepository, error) {
return redisStore.NewProxyRepository(client, redisStore.DefaultTxMaxAttempts, redisStore.DefaultTxBaseDelay), nil
}
func NewLayerRepository(ctx context.Context, client redis.UniversalClient) (store.LayerRepository, error) {
return redisStore.NewLayerRepository(client, redisStore.DefaultTxMaxAttempts, redisStore.DefaultTxBaseDelay), nil
}