Module Http.Make

Parameters

module IO : Types.IO
module C : C with type 'a io = 'a IO.t

Signature

exception Not_implemented
exception Request_failed of int * string
include Storage.S with type 'a io := 'a IO.t
type t

The storage type.

module Group : sig ... end
module Array : sig ... end
val hierarchy : t -> (Node.Array.t list * Node.Group.t list) IO.t

hierarchy t returns p where p is a pair of lists representing all nodes in store t. The first element of the pair is a list of all array nodes, and the second element is a list of all group nodes. This operation returns a pair of empty lists if store t is empty.

  • raises Parse_error

    if any node has invalid node_type metadata.

val clear : t -> unit IO.t

clear t clears the store t by deleting all nodes. If the store is already empty, this is a no-op.

type auth = {
  1. user : string;
  2. pwd : string;
}
val with_open : ?basic_auth:auth -> ?redirects:int -> ?tries:int -> ?timeout:int -> string -> (t -> 'a IO.t) -> 'a IO.t

with_open url f connects to the Zarr store described by the url url and applies function f to the store's open handle.

  • basic_auth is the username and password to use for each request if required by the server.
  • redirects is the maximum number of redirects allowed per http request. Defaults to 5.
  • tries is the maximum number of times to retry a failed request. Defaults to 3.
  • timeout is the timeout for the connect phase. It sets the maximum time in seconds that you allow the connection phase to take. This timeout only limits the connection phase, it has no impact once the client has connected. The connection phase includes the name resolve (DNS) and all protocol handshakes and negotiations until there is an established connection with the remote side.