daenyth / cats-effect-guava   0.2.0

MIT License Website GitHub

Cats-effect integration with guava ListenableFuture

Scala versions: 3.x 2.13 2.12

cats-effect-guava

Install

This library is currently available for Scala binary versions 2.12, 2.13, and 3.3+.

To use the latest version, include the following in your build.sbt:

libraryDependencies ++= Seq(
  "io.github.daenyth" %% "cats-effect-guava" % "@VERSION@"
)

Usage

import daenyth.guava._

def googleyMoogley(): ListenableFuture[String] = ???

def catsyMoogley: F[String] = Async[F].fromListenableFuture(Sync[F].delay(googleyMoogley()))
def ioMoogley: IO[String] = IO.fromListenableFuture(IO(googleyMoogley()))