io.chrisdavenport.rediculous
Type members
Classlikes
RedisCtx is the Context in Which RedisOperations operate.
RedisCtx is the Context in Which RedisOperations operate.
- Companion
- object
Indicates a Error while processing for Rediculous
Indicates a Error while processing for Rediculous
- Companion
- object
A RedisPubSub Represent an connection or group of connections communicating to the pubsub subsystem of Redis.
A RedisPubSub Represent an connection or group of connections communicating to the pubsub subsystem of Redis.
Only one caller should be responsible for runMessages, but delegation of how to handle errors and what to do when the connection closes or what state it closes is left to the user so they can determine what to do.
Subscription commands are run synchronous to matching subscriptions. If your operations need to take a long time please delegate them into a queue for handling without holding up other messages being processed.
- Companion
- object
Transactions Operate via typeclasses. RedisCtx allows us to abstract our operations into different types depending on the behavior we want. In the case of transactions that is RedisTransaction. These can be composed together via its Applicative instance to form a transaction consisting of multiple commands, then transacted via either multiExec or transact on the class.
Transactions Operate via typeclasses. RedisCtx allows us to abstract our operations into different types depending on the behavior we want. In the case of transactions that is RedisTransaction. These can be composed together via its Applicative instance to form a transaction consisting of multiple commands, then transacted via either multiExec or transact on the class.
In Cluster Mode the first key operation defines the node the entire Transaction will be sent to. Transactions are required to only operate on operations containing keys in the same keyslot, and users are required to hold this imperative or else redis will reject the transaction.
- Example
import io.chrisdavenport.rediculous._ import cats.effect.Concurrent val tx = ( RedisCommands.ping[RedisTransaction], RedisCommands.del[RedisTransaction](List("foo")), RedisCommands.get[RedisTransaction]("foo"), RedisCommands.set[RedisTransaction]("foo", "value"), RedisCommands.get[RedisTransaction]("foo") ).tupled def operation[F[_]: Concurrent] = tx.transact[F]
- Companion
- object