package irmin-watcher

  1. Overview
  2. Docs
On This Page
  1. Helpers
Legend:
Library
Module
Module type
Parameter
Class
Class type

Core functions for Irmin watchers.

0.1.0 — homepage

type t = int -> string -> (string -> unit Lwt.t) -> (unit -> unit) Lwt.t

The type for notifications hooks. A hook f is applied by Irmin's runtime by calling it with f id dir fn, where id is a unique identifier to identify the hook in the debug messages, dir is the directory to watch for changes and f is the callback to apply on every path changes.

module Digests : sig ... end

Sets of filenames and their digests.

module Callback : sig ... end

Dispatch listening functions.

module Watchdog : sig ... end

Watchdog functions. Ensure that only one background process is monitoring events for a given directory.

val create : Watchdog.t -> (string -> Watchdog.hook) -> t

create t h is the Irmin watcher using the watchdogs defined in t and the update hook h.

Helpers

val stoppable : (unit -> unit Lwt.t) -> unit -> unit

stoppable t is a function f such that calling f will cancel the thread t.

OCaml

Innovation. Community. Security.