package stog_server
Module Stog_server.RunSource
Computing stog documents in preview server
Source
type state = {stog : Stog.Types.stog;stog_modules : (module Stog.Engine.Module) list;stog_errors : string list;stog_warnings : string list;doc_dates : float Stog.Path.Map.t;busy : bool;
}Source
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.tStart 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.
Source
val refresh :
(unit -> Stog.Types.stog) ->
state option ref ->
(Stog.Types.doc -> unit Lwt.t) ->
(string list -> unit Lwt.t) ->
unit Lwt.trefresh 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.