dev.profunktor.redis4cats.connection.RedisMasterReplica.MasterReplicaPartiallyApplied
Attributes
-
Graph
-
-
Supertypes
-
class Object
trait Matchable
class Any
Members list
Creates a RedisMasterReplica
It will also create an underlying RedisClient with default client options to establish connection with Redis.
Example:
val conn: Resource[IO, RedisMasterReplica[String, String]] =
Resource.eval(RedisURI.make[IO](redisURI)).flatMap { uri =>
RedisMasterReplica[IO].make(RedisCodec.Utf8, uri)(Some(ReadFrom.MasterPreferred))
}
Attributes
Creates a RedisMasterReplica using the supplied client options
It will also create an underlying RedisClient using the supplied client options to establish connection with Redis.
Example:
val conn: Resource[IO, RedisMasterReplica[String, String]] =
for {
ops <- Resource.eval(Sync[F].delay(ClientOptions.create()))
uri <- Resource.eval(RedisURI.make[IO](redisURI))
mrc <- RedisMasterReplica[IO].withOptions(RedisCodec.Utf8, ops, uri)(Some(ReadFrom.MasterPreferred))
} yield mrc
Attributes