package hiredis

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t
val error_string : t -> string option

Returns the error string associated with a hiredis context

val connect : ?scripts:(string, string) Hashtbl.t -> ?auth:string -> ?nonblock:bool -> ?port:int -> string -> t

Create a new client connection

val of_fd : ?scripts:(string, string) Hashtbl.t -> ?close_fd:bool -> Unix.file_descr -> t

Create a new client from an existing file descr

val to_fd : t -> Unix.file_descr

Get the underlying file descr

val set_timeout : t -> int -> int -> status

Set a client's timeout

val enable_keepalive : t -> status

Enable keepalive on the client

val append_command : t -> string array -> status

Queue command to be executed

val append_command_v : t -> value array -> status

Similar to append_command but using a command made of Hiredis values

val append_formatted : t -> string -> status

Append a pre-formatted command string to be executed

val append_value : t -> value -> status
val flush_buffer : t -> status
val read_buffer : t -> status
val get_reply : t -> value option

get_reply client executes the queued commands and returns the result

val run : t -> string array -> value

Execute a command formatted as an array of strings and return the reply immediately

val run_v : t -> value array -> value

Execute a command formatted as an array of values and return the reply immediately

val load_script : t -> string -> string -> unit

load_script name script will load a lua script onto the server and make it available from the existing * client as name

val call_script : t -> string -> int -> string list -> value

call_script client name nkeys args calls a script by name with the given number of keys and arguments

val call_script_v : t -> string -> int -> value list -> value

Similar to call_script but with a list of values for arguments

OCaml

Innovation. Community. Security.