Search in sources :

Example 1 with RedisConnectionService

use of uk.gov.di.authentication.shared.services.RedisConnectionService in project di-authentication-api by alphagov.

the class RedisExtension method beforeAll.

@Override
public void beforeAll(ExtensionContext context) throws Exception {
    redis = new RedisConnectionService(REDIS_HOST, 6379, false, REDIS_PASSWORD, false);
    RedisURI.Builder builder = RedisURI.builder().withHost(REDIS_HOST).withPort(6379).withSsl(false);
    if (REDIS_PASSWORD.isPresent())
        builder.withPassword(REDIS_PASSWORD.get().toCharArray());
    RedisURI redisURI = builder.build();
    client = RedisClient.create(redisURI);
}
Also used : RedisConnectionService(uk.gov.di.authentication.shared.services.RedisConnectionService) RedisURI(io.lettuce.core.RedisURI)

Aggregations

RedisURI (io.lettuce.core.RedisURI)1 RedisConnectionService (uk.gov.di.authentication.shared.services.RedisConnectionService)1