sig
  val start :
    just_before_listening:(unit ->
                           (unit,
                            [> `Database of Trakeva.Error.t
                             | `Database_unavailable of string
                             | `Dyn_plugin of
                                 [> `Dynlink_error of Dynlink.error
                                  | `Findlib of exn ]
                             | `Failure of string
                             | `Fetching_node of
                                 Ketrew.Persistent_data.Error.fetching_node
                             | `IO of [> `Read_file_exn of string * exn ]
                             | `Server_status_error of string
                             | `Start_server_error of string
                             | `System of
                                 [> `File_info of string
                                  | `List_directory of string
                                  | `Remove of string ] *
                                 [> `Exn of exn ]
                             | `Target of [> `Deserilization of string ] ]
                            as 'propagated_error)
                           Unix_io.t) ->
    configuration:Ketrew.Configuration.server ->
    (unit, 'propagated_error) Unix_io.t
  val status :
    configuration:Ketrew.Configuration.server ->
    ([ `Not_responding of string
     | `Running
     | `Wrong_response of Cohttp.Response.t ],
     [> `Failure of string | `Server_status_error of string ])
    Unix_io.Deferred_result.t
  val stop :
    configuration:Ketrew.Configuration.server ->
    ([ `Done | `Timeout ],
     [> `IO of
          [> `Exn of exn | `File_exists of string | `Wrong_path of string ]
      | `Stop_server_error of string
      | `System of [> `File_info of string ] * [> `Exn of exn ] ])
    Unix_io.Deferred_result.t
end