Connection API

Purely functional interface for the Connection API.

Connection Commands usage

Once you have acquired a connection you can start using it:

import cats.effect.IO
import cats.syntax.all._

def putStrLn(str: String): IO[Unit] = IO(println(str))

commandsApi.use { cmd => // ConnectionCommands[IO]
  for {
    pong <- cmd.ping
    _ <- putStrLn(pong) //"pong"
  } yield ()
}