Native async Valkey/Redis client for MoonBit
No dependents
Metalymph/valkey does not have a README file
pub suberror RespError { InvalidPrefix(Int) UnexpectedEndOfStream MalformedNumber MalformedCrlf} derive(ToJson, @moonbitlang/core/debug.DebugDebug)
pub suberror ValkeyError { ConnectionError(String) ProtocolError(String)} derive(ToJson, @moonbitlang/core/debug.DebugDebug)
pub struct Client { conn : @moonbitlang/async/socket.TcpTcp}
async fn Client::connect(host : String, port : Int) -> Client
async fn Client::del(self : Client, key : String) -> Int64
async fn Client::exists(self : Client, key : String) -> Bool
async fn Client::get(self : Client, key : String) -> String?
async fn Client::ping(self : Client) -> Unit
async fn Client::read_response(self : Client) -> RespValue
async fn Client::request(self : Client, args : Array[String]) -> RespValue
async fn Client::send_command(self : Client, args : Array[String]) -> Unit
async fn Client::set(self : Client, key : String, value : String) -> Unit
async fn Client::xack(self : Client, stream : String, group : String, id : String) -> Int64
async fn Client::xadd(self : Client, stream : String, payload : String) -> String
async fn Client::xautoclaim(self : Client, stream : String, group : String, consumer : String, min_idle_ms : Int) -> (String, String)?
async fn Client::xgroup_create(self : Client, stream : String, group : String) -> Unit
async fn Client::xpending_count(self : Client, stream : String, group : String) -> Int64
async fn Client::xreadgroup(self : Client, stream : String, group : String, consumer : String, count : Int) -> (String, String)?
async fn Client::xreadgroup_block(self : Client, stream : String, group : String, consumer : String, count : Int, block_ms : Int) -> (String, String)?
pub struct RespParser[R] { reader : R}
fn[R] RespParser::new(reader : R) -> RespParser[R]
async fn[R : @moonbitlang/async/io.ReaderReader] RespParser::parse_value(self : RespParser[R]) -> RespValue
pub enum RespValue { SimpleString(String) Error(String) Integer(Int64) BulkString(String?) Array(Array[RespValue]?)} derive(ToJson, @moonbitlang/core/debug.DebugDebug)
Install
Powered by MoonBit
© 2026 mooncakes.io