sup has an fs2-redis module:

libraryDependencies += "com.kubukoz" %% "sup-redis" % "0.5.0"


import sup._, sup.modules.redis._

What’s included


You can build a connection check out of a Ping algebra (included in RedisCommands). Let’s create one first:

import com.github.gvolpe.fs2redis.algebra.Ping, cats.effect._
// import com.github.gvolpe.fs2redis.algebra.Ping
// import cats.effect._

implicit def ping: Ping[IO] = ???
// ping: com.github.gvolpe.fs2redis.algebra.Ping[cats.effect.IO]

And now the health check:

def redisCheck = pingCheck[IO, Throwable]
// redisCheck: sup.HealthCheck[cats.effect.IO,cats.Id]

Errors are automatically recovered to a Sick status in this check.