package stog_server

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

Computing stog documents in preview server

module Xdiff = Xmldiff
type state = {
  1. stog : Stog.Types.stog;
  2. stog_modules : (module Stog.Engine.Module) list;
  3. stog_errors : string list;
  4. stog_warnings : string list;
  5. doc_dates : float Stog.Path.Map.t;
  6. busy : bool;
}
val run_stog : ?docs:Stog.Types.Doc_set.t -> state -> state Lwt.t
val watch : Stog.Types.stog -> state option ref -> on_update: (Stog.Types.stog -> Stog.Types.stog -> Stog.Types.Doc_set.elt -> unit Lwt.t) -> on_error:(errors:string list -> warnings:string list -> unit Lwt.t) -> 'a Lwt.t

Start a Lwt thread watching for changes on stog files, relaunching computations of documents and sending patches on document update.* using on_update. on_error is called with warnings and errors, if any.

val refresh : (unit -> Stog.Types.stog) -> state option ref -> (Stog.Types.doc -> unit Lwt.t) -> (string list -> unit Lwt.t) -> unit Lwt.t

refresh load state send_doc on_error reload stog structure from filesystem using load, sends all documents to clients using send_doc. In case of error, on_error is called with the list of errors.

OCaml

Innovation. Community. Security.