package kinetic-client

  1. Overview
  2. Docs

Parameters

module I : INTEGRATION

Signature

module Entry : sig ... end
type session
val get_connection_id : session -> int64
type batch
val get_batch_id : batch -> int32
type client
val get_session : client -> session
type synchronization =
  1. | WRITETHROUGH
  2. | WRITEBACK
  3. | FLUSH
val get_config : session -> Config.t
val make_sha1 : I.value slice -> Tag.t
val make_crc32 : I.value slice -> Tag.t
type 'a result = ('a, Error.t) Lwt_result.t
val handshake : string -> int64 -> ?trace:bool -> ?timeout:float -> ?max_operation_count_per_batch:int -> I.socket -> session result

The initial contact with the device, which will send some information that is needed in the session

val tracing : session -> bool -> unit

turn on or of the trace logging of the raw messages

val put : ?timeout:timeout_ms -> ?priority:priority -> client -> key -> I.value slice -> db_version:version -> new_version:version -> forced:bool option -> synchronization:synchronization option -> tag:Tag.t option -> unit result

insert a key value pair. db_version is the version that's supposed to be the current version in the database. new_version is the version of the key value pair _after_ the update. forced updates happen regardless the db_version

val delete_forced : ?timeout:timeout_ms -> ?priority:priority -> client -> key -> unit result
val get : ?timeout:timeout_ms -> ?priority:priority -> client -> key -> (I.value * version) option result
val noop : ?timeout:timeout_ms -> ?priority:priority -> client -> unit result
val instant_secure_erase : ?pin:bytes -> client -> unit result
val download_firmware : client -> I.value slice -> unit result
val get_key_range : ?timeout:timeout_ms -> ?priority:priority -> client -> key -> bool -> (key * bool) option -> bool -> int -> key list result
val get_capacities : ?timeout:timeout_ms -> ?priority:priority -> client -> (int64 * float) result

returns capacity of the drive and portion full

type forced = bool option
type batch_operation =
  1. | BPut of Entry.t * forced
  2. | BDel of Entry.t * forced
val do_batch : ?timeout:timeout_ms -> ?priority:priority -> client -> batch_operation list -> unit result
val wrap_socket : ?trace:bool -> ?timeout:float -> ?secret:string -> ?cluster_version:int64 -> ?max_operation_count_per_batch:int -> I.socket -> (unit -> unit Lwt.t) -> client result
val dispose : client -> unit Lwt.t