sig
type t
module Error :
sig
type database =
[ `Close
| `Exec of string * string list
| `Fetching_node of string
| `Load of string
| `Parsing of string ] *
[ `Exn of string | `Pointer_loop_max_depth of int ]
val database_to_string :
Ketrew.Persistent_data.Error.database -> string
end
val create :
database_parameters:string ->
(Ketrew.Persistent_data.t,
[> `Database of Ketrew.Persistent_data.Error.database ])
Unix_io.Deferred_result.t
val unload :
Ketrew.Persistent_data.t ->
(unit, [> `Database of Ketrew.Persistent_data.Error.database ])
Unix_io.Deferred_result.t
val get_target :
Ketrew.Persistent_data.t ->
Ketrew_pure.Target.id ->
(Ketrew_pure.Target.t,
[> `Database of Ketrew.Persistent_data.Error.database ])
Unix_io.Deferred_result.t
val query_nodes :
?max_nodes:int ->
Ketrew.Persistent_data.t ->
Ketrew_pure.Protocol.Up_message.target_query ->
(Ketrew_pure.Target.t list,
[> `Database of Ketrew.Persistent_data.Error.database ])
Unix_io.Deferred_result.t
val activate_target :
Ketrew.Persistent_data.t ->
target:Ketrew_pure.Target.t ->
reason:[ `Dependency of Ketrew_pure.Target.id | `User ] ->
(unit, [> `Database of Ketrew.Persistent_data.Error.database ])
Unix_io.Deferred_result.t
val fold_active_targets :
limit:< items : int; not_seen_for : float > ->
Ketrew.Persistent_data.t ->
init:'a ->
f:('a ->
target:Ketrew_pure.Target.t ->
('a,
[> `Database of Ketrew.Persistent_data.Error.database ]
as 'combined_errors)
Unix_io.Deferred_result.t) ->
('a, 'combined_errors) Unix_io.Deferred_result.t
val update_target :
Ketrew.Persistent_data.t ->
Ketrew_pure.Target.t ->
(unit, [> `Database of Ketrew.Persistent_data.Error.database ])
Unix_io.Deferred_result.t
val find_all_orphans :
Ketrew.Persistent_data.t ->
(Ketrew_pure.Target.t list,
[> `Database of Ketrew.Persistent_data.Error.database ])
Unix_io.Deferred_result.t
module Change :
sig
type t =
[ `New_nodes of string list
| `Nodes_changed of string list
| `Started ]
val pp :
Format.formatter ->
Ketrew.Persistent_data.Change.t -> Ppx_deriving_runtime.unit
val show :
Ketrew.Persistent_data.Change.t -> Ppx_deriving_runtime.string
end
val next_changes :
Ketrew.Persistent_data.t ->
(Ketrew.Persistent_data.Change.t list, 'a) Unix_io.Deferred_result.t
module Killing_targets :
sig
val proceed_to_mass_killing :
Ketrew.Persistent_data.t ->
(bool, [> `Database of Ketrew.Persistent_data.Error.database ])
Unix_io.Deferred_result.t
val add_target_ids_to_kill_list :
Ketrew.Persistent_data.t ->
string list ->
(unit, [> `Database of Ketrew.Persistent_data.Error.database ])
Unix_io.Deferred_result.t
end
module Adding_targets :
sig
val register_targets_to_add :
Ketrew.Persistent_data.t ->
Ketrew_pure.Target.t list ->
(unit, [> `Database of Ketrew.Persistent_data.Error.database ])
Unix_io.Deferred_result.t
val check_and_really_add_targets :
Ketrew.Persistent_data.t ->
(bool, [> `Database of Ketrew.Persistent_data.Error.database ])
Unix_io.Deferred_result.t
val force_add_passive_target :
Ketrew.Persistent_data.t ->
Ketrew_pure.Target.Stored_target.target ->
(unit, [> `Database of Ketrew.Persistent_data.Error.database ])
Unix_io.Deferred_result.t
end
module Synchronize :
sig
val copy :
string ->
string ->
(unit,
[> `Synchronize of
string * string *
[> `Database of Ketrew.Persistent_data.Error.database
| `IO of
[> `Read_file_exn of string * exn
| `Write_file_exn of string * exn ]
| `System of
[> `File_info of string
| `List_directory of string
| `Make_directory of string ] *
[> `Exn of exn | `Wrong_access_rights of int ]
| `Target of [> `Deserilization of string ]
| `Unknown_uri_scheme of string * string option
| `Weird_file of string ] ])
Unix_io.Deferred_result.t
module Error :
sig
val to_string :
string * string *
[< `Database of Ketrew.Persistent_data.Error.database
| `IO of
[< `Exn of exn
| `File_exists of string
| `Read_file_exn of string * exn
| `Write_file_exn of string * exn
| `Wrong_path of string ]
| `System of
[< `Copy of string
| `File_info of string
| `File_tree of string
| `List_directory of string
| `Make_directory of string
| `Make_symlink of string * string
| `Move of string
| `Remove of string ] *
[< `Already_exists
| `Exn of exn
| `File_exists of string
| `File_not_found of string
| `IO of
[< `Exn of exn
| `File_exists of string
| `Read_file_exn of string * exn
| `Write_file_exn of string * exn
| `Wrong_path of string ]
| `Not_a_directory of string
| `Wrong_access_rights of int
| `Wrong_file_kind of
string * Pvem_lwt_unix.System.file_info
| `Wrong_path of string ]
| `Target of [< `Deserilization of string ]
| `Unknown_uri_scheme of string * string option
| `Weird_file of string ] ->
string
end
end
end