sig
type t
module Error :
sig
type fetching_node =
[ `Get_stored_target
| `Pointer_loop_max_depth of int
| `Target_to_add ] * [ `Id of string ]
end
val create :
database_parameters:string ->
archival_age_threshold:[ `Days of float ] ->
(Ketrew.Persistent_data.t,
[> `Database of Trakeva.Error.t
| `Database_unavailable of string
| `Fetching_node of Ketrew.Persistent_data.Error.fetching_node
| `Target of [> `Deserilization of string ] ])
Unix_io.Deferred_result.t
val unload :
Ketrew.Persistent_data.t ->
(unit, [> `Database of [> `Close ] * string ]) Unix_io.Deferred_result.t
val get_target :
Ketrew.Persistent_data.t ->
Ketrew_pure.Target.id ->
(Ketrew_pure.Target.t,
[> `Database of Trakeva.Error.t
| `Database_unavailable of string
| `Fetching_node of Ketrew.Persistent_data.Error.fetching_node
| `Target of [> `Deserilization of string ] ])
Unix_io.Deferred_result.t
val all_visible_targets :
Ketrew.Persistent_data.t ->
(Ketrew_pure.Target.t list,
[> `Database of Trakeva.Error.t
| `Database_unavailable of string
| `Fetching_node of Ketrew.Persistent_data.Error.fetching_node
| `Target of [> `Deserilization of string ] ])
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
[> `Act of Trakeva.Action.t
| `Get of Trakeva.Key_in_collection.t
| `Get_all of string
| `Load of string ] *
string
| `Database_unavailable of string
| `Fetching_node of Ketrew.Persistent_data.Error.fetching_node
| `Target of [> `Deserilization of string ] ])
Unix_io.Deferred_result.t
val fold_active_targets :
Ketrew.Persistent_data.t ->
init:'a ->
f:('a ->
target:Ketrew_pure.Target.t ->
('a,
[> `Database of
[> `Get of Trakeva.Key_in_collection.t
| `Iter of string
| `Load of string ] *
string
| `Fetching_node of Ketrew.Persistent_data.Error.fetching_node
| `Target of [> `Deserilization of string ] ]
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 [> `Act of Trakeva.Action.t | `Load of string ] * string
| `Database_unavailable of string ])
Unix_io.Deferred_result.t
val find_all_orphans :
Ketrew.Persistent_data.t ->
(Ketrew_pure.Target.t list,
[> `Database of Trakeva.Error.t
| `Database_unavailable of string
| `Fetching_node of Ketrew.Persistent_data.Error.fetching_node
| `Target of [> `Deserilization of string ] ])
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
[> `Act of Trakeva.Action.t
| `Get of Trakeva.Key_in_collection.t
| `Get_all of string
| `Load of string ] *
string
| `Database_unavailable of string
| `Fetching_node of Ketrew.Persistent_data.Error.fetching_node
| `Target of [> `Deserilization of string ] ])
Unix_io.Deferred_result.t
val add_target_ids_to_kill_list :
Ketrew.Persistent_data.t ->
string list ->
(unit,
[> `Database of
[> `Act of Trakeva.Action.t | `Load of string ] * string
| `Database_unavailable of string ])
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
[> `Act of Trakeva.Action.t | `Load of string ] * string
| `Database_unavailable of string ])
Unix_io.Deferred_result.t
val check_and_really_add_targets :
Ketrew.Persistent_data.t ->
(bool,
[> `Database of
[> `Act of Trakeva.Action.t
| `Get of Trakeva.Key_in_collection.t
| `Get_all of string
| `Load of string ] *
string
| `Database_unavailable of string
| `Fetching_node of Ketrew.Persistent_data.Error.fetching_node
| `Target of [> `Deserilization of string ] ])
Unix_io.Deferred_result.t
val force_add_passive_target :
Ketrew.Persistent_data.t ->
Ketrew_pure.Target.Stored_target.target ->
(unit,
[> `Database of
[> `Act of Trakeva.Action.t | `Load of string ] * string
| `Database_unavailable of string ])
Unix_io.Deferred_result.t
end
module Synchronize :
sig
val copy :
string ->
string ->
(unit,
[> `Database of Trakeva.Error.t
| `Database_unavailable of string
| `Fetching_node of Ketrew.Persistent_data.Error.fetching_node
| `IO of
[> `Read_file_exn of string * exn
| `Write_file_exn of string * exn ]
| `Not_a_directory of string
| `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 ] ])
Unix_io.Deferred_result.t
end
end