package stog_server_multi

  1. Overview
  2. Docs

Handling multi server sessions

type session_state =
  1. | Live
  2. | Stopped
  3. | Error of string
val session_state_to_yojson : session_state -> Yojson.Safe.t
type stored = {
  1. session_create_date : float;
  2. mutable session_state : session_state;
  3. session_author : string;
  4. session_git : Git_server.git_repo;
}
val stored_to_yojson : stored -> Yojson.Safe.t
type stog_info = {
  1. stog_dir : string;
  2. mutable stog_state : Stog_server.Run.state option Stdlib.ref;
  3. mutable stog_ws_cons : (Websocket.Frame.t Lwt_stream.t * (Websocket.Frame.t -> unit Lwt.t)) list Stdlib.ref;
  4. stog_preview_url : Stog.Url.t;
}
type editor_info = {
  1. mutable editor_ws_cons : Ed.Server.connection_group;
  2. editor_url : Stog.Url.t;
}
type session = {
  1. session_id : string;
  2. session_dir : string;
  3. session_stored : stored;
  4. session_stog : stog_info;
  5. session_editor : editor_info;
}
val new_id : unit -> string
val read_stog : string -> Stog.Types.stog

Read stog structure from the given directory.

val mk_edit_branch_name : string -> string
val store_stored : session -> unit
val start_session : ?sshkey:string -> session -> unit
val load_previous_sessions : Config.t -> session list
OCaml

Innovation. Community. Security.