RedisProvider.fromEnvironment constructor

RedisProvider.fromEnvironment(
  1. EnvContract env
)

Implementation

factory RedisProvider.fromEnvironment(EnvContract env) {
  env.validate(RedisEnvKeys.values);

  return RedisProvider(
    host: env.get(RedisEnvKeys.redisHost),
    port: int.parse(env.get(RedisEnvKeys.redisPort)),
    password: env.get<String?>(RedisEnvKeys.redisPassword),
  );
}