package xenstore

  1. Overview
  2. Docs

Module Xs_client_unix.ClientSource

Parameters

module IO : IO

Signature

Sourcetype client

A multiplexing xenstore client.

Sourceval set_logger : (string -> unit) -> unit

Set a callback in order to get logging from the library

Sourceval make : unit -> client IO.t

make () initialises and returns a xenstore client.

Sourceval set_watch_callback : client -> watch_callback -> unit

set_watch_callback cb registers a manual watch callback.

Sourcetype handle

A handle represents a single thread's xenstore access.

Sourceval immediate : client -> (handle -> 'a IO.t) -> 'a IO.t

Access xenstore with individual operations.

Sourceval transaction_one_try : client -> (handle -> 'a IO.t) -> 'a IO.t

Access xenstore with a single transaction. On conflict the Eagain error will not be handled but will be passed up to the caller.

Sourceval transaction_attempts : int -> client -> (handle -> 'a IO.t) -> 'a IO.t

Access xenstore with a single transaction. On conflict the operation may be attempted again, up to a total of (max attempts 1) attempts. If the last of those fails with a conflict, the Eagain exception will be raised to the caller.

Sourceval transaction : client -> (handle -> 'a IO.t) -> 'a IO.t

DEPRECATED! Access xenstore with a single transaction. On conflict the operation will be repeated INDEFINITELY, with no guarantee of eventual success or termination.

Sourceval wait : client -> (handle -> 'a IO.t) -> 'a Task.u

Wait for some condition to become true and return a value. The function argument should throw Eagain if the condition is not met, and the condition will be re-evaluated when paths change.

Sourceval directory : handle -> string -> string list IO.t

directory h path returns the directory listing of path.

Sourceval read : handle -> string -> string IO.t

read h path returns the value at path or raises Enoent.

Sourceval write : handle -> string -> string -> unit IO.t

write h k v writes v at k.

Sourceval rm : handle -> string -> unit IO.t

rm h k removes the node k.

Sourceval mkdir : handle -> string -> unit IO.t

mkdir h k creates the node k with an empty value.

Sourceval setperms : handle -> string -> Xs_protocol.ACL.t -> unit IO.t

setperms h k acl sets the permissions of k to acl.

Sourceval debug : handle -> string list -> string list IO.t

debug cmd_args invokes a debug command.

Sourceval getdomainpath : handle -> int -> string IO.t

getdomainpath domid returns the local directory of domain domid.

Sourceval watch : handle -> string -> string -> unit IO.t

watch h path token registers a manual watch at path with token.

Sourceval unwatch : handle -> string -> string -> unit IO.t

unwatch h path token unregisters a manual watch at path with token.

Sourceval introduce : handle -> int -> nativeint -> int -> unit IO.t

introduce h domid store_mfn store_port called by a toolstack to signal the construction of a new domain.

Sourceval set_target : handle -> int -> int -> unit IO.t

set_target h stubdom_domid domid called by a toolstack to grant stubdom_domid the permissions owned by domid.

OCaml

Innovation. Community. Security.