Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added xreadgroup, xtrim, xclaim, xautoclaim, xpending commands #52

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,15 @@ object RedisCommands {
RedisCtx[F].unkeyed(NEL("XREVRANGE", stream :: end ::: start ::: count))
}

def xgroupcreate[F[_]: RedisCtx](stream: String, groupName: String, startId: String, mkStream: Boolean = false): F[Status] = {
def xgroupcreate[F[_]: RedisCtx](stream: String, groupName: String, startId: String, mkStream: Boolean): F[Status] = {
val mkStreamFragment = Alternative[List].guard(mkStream).as("MKSTREAM")
RedisCtx[F].unkeyed(NEL("XGROUP", "CREATE" :: stream :: groupName :: startId :: mkStreamFragment))
}

@deprecated("use xgroupcreate(stream: String, groupName: String, startId: String, mkStream: Boolean) instead", "0.3.3")
def xgroupcreate[F[_]: RedisCtx](stream: String, groupName: String, startId: String): F[Status] =
Swoorup marked this conversation as resolved.
Show resolved Hide resolved
xgroupcreate(stream, groupName, startId, false)

def xgroupsetid[F[_]: RedisCtx](stream: String, groupName: String, messageId: String): F[Status] =
RedisCtx[F].unkeyed(NEL.of("XGROUP", "SETID", stream, groupName, messageId))

Expand Down