package irmin-watcher

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

Active polling backend for Irmin watchers.

0.2.0 — homepage

val v : float -> Irmin_watcher_core.t

v delay id p f is the hook calling f everytime a sub-path of p is modified. Return a function to call to remove the hook. Active polling is done every delay seconds.

type event = [
  1. | `Unknown
  2. | `File of string
]

The type for change event.

val listen : wait_for_changes:(unit -> event Lwt.t) -> dir:string -> Irmin_watcher_core.Watchdog.hook

listen ~wait_for_changes ~dir is the watchdog hook using wait_for_changes to detect filesystem updates in the directory dir. The polling implemention just calls Lwt_unix.sleep.

val default_polling_time : float ref

The default interval for active polling, in seconds. By default it is 1s.