Server API

Purely functional interface for the Server API.

Server 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 => // ServerCommands[IO]
  for {
    _ <- cmd.flushAll
    _ <- cmd.flushAllAsync
  } yield ()
}