package ezxenstore

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Helper functions for handling common types of xenstore watches

type path = string
exception Timeout of float
type 'a t = {
  1. evaluate : Xenstore.Xs.xsh -> 'a;
}

Represents a condition to wait for

val map : ('a -> 'b) -> 'a t -> 'b t
val has_fired : xs:'a -> 'b Xs_transport_unix_client.t t -> bool
val wait_for : xs:'a -> ?timeout:float -> 'b Xs_transport_unix_client.t t -> 'b

Block waiting for a result

val value_to_appear : path -> string t

Wait for a node to appear in the store and return its value

val key_to_disappear : path -> unit t

Wait for a node to disappear from the store

val value_to_become : path -> string -> unit t

Wait for a node to appear with a particular value

val all_of : 'a t list -> 'a list t

Wait for a set of conditions simultaneously. Note when any watch fires we re-evaluate everything which isn't necessarily the most efficient thing to do.

val any_of : ('a * 'b t) list -> ('a * 'b) t

Wait for any of a set of tagged conditions to become true. Return the tag of the first condition and the result.