RedisClientPartiallyApplied

dev.profunktor.redis4cats.connection.RedisClient.RedisClientPartiallyApplied

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def custom(uri: => RedisURI, opts: ClientOptions, config: Redis4CatsConfig): Resource[F, RedisClient]

Creates a RedisClient with the supplied options from a validated URI.

Creates a RedisClient with the supplied options from a validated URI.

Example:

for {
 uri <- Resource.eval(RedisURI.make[F]("redis://localhost"))
 ops <- Resource.eval(Sync[F].delay(ClientOptions.create())) // configure timeouts, etc
 cli <- RedisClient[IO].custom(uri, ops)
} yield cli

Additionally, it can take a dev.profunktor.redis4cats.config.Redis4CatsConfig to configure the shutdown timeouts, for example. However, you don't need to worry about this in most cases.

RedisClient[IO].custom(uri, ops, Redis4CatsConfig())

If not supplied, sane defaults will be used.

Attributes

def from(strUri: => String)(implicit F: Sync[F]): Resource[F, RedisClient]

Creates a RedisClient with default options.

Creates a RedisClient with default options.

Example:

RedisClient[IO].from("redis://localhost")

Attributes

def fromUri(uri: => RedisURI)(implicit F: Sync[F]): Resource[F, RedisClient]

Creates a RedisClient with default options from a validated URI.

Creates a RedisClient with default options from a validated URI.

Example:

for {
 uri <- Resource.eval(RedisURI.make[F]("redis://localhost"))
 cli <- RedisClient[IO].fromUri(uri)
} yield cli

You may prefer to use from instead, which takes a raw string.

Attributes

def withOptions(strUri: => String, opts: ClientOptions): Resource[F, RedisClient]

Creates a RedisClient with the supplied options.

Creates a RedisClient with the supplied options.

Example:

for {
 ops <- Resource.eval(Sync[F].delay(ClientOptions.create())) // configure timeouts, etc
 cli <- RedisClient[IO].withOptions("redis://localhost", ops)
} yield cli

Attributes

Implicits

Implicits

implicit val fl: FutureLift[F]
implicit val log: Log[F]