Module Ketrew.Persistent_data

module Persistent_data: sig .. end

type t 
module Error: sig .. end
val create : database_parameters:string ->
archival_age_threshold:[ `Days of float ] ->
(t,
[> `Database of Trakeva.Error.t
| `Database_unavailable of string
| `Fetching_node of Error.fetching_node
| `Target of [> `Deserilization of string ] ])
Unix_io.Deferred_result.t
val unload : t ->
(unit, [> `Database of [> `Close ] * string ]) Unix_io.Deferred_result.t
val get_target : t ->
Ketrew_pure.Target.id ->
(Ketrew_pure.Target.t,
[> `Database of Trakeva.Error.t
| `Database_unavailable of string
| `Fetching_node of Error.fetching_node
| `Target of [> `Deserilization of string ] ])
Unix_io.Deferred_result.t
val all_visible_targets : t ->
(Ketrew_pure.Target.t list,
[> `Database of Trakeva.Error.t
| `Database_unavailable of string
| `Fetching_node of Error.fetching_node
| `Target of [> `Deserilization of string ] ])
Unix_io.Deferred_result.t
val activate_target : 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 Error.fetching_node
| `Target of [> `Deserilization of string ] ])
Unix_io.Deferred_result.t
val fold_active_targets : 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 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 : 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 : t ->
(Ketrew_pure.Target.t list,
[> `Database of Trakeva.Error.t
| `Database_unavailable of string
| `Fetching_node of Error.fetching_node
| `Target of [> `Deserilization of string ] ])
Unix_io.Deferred_result.t
find_all_orphans goes through the cache and returns all the targets that are passive but not reachable, i.e. that can't be activated, ever.
module Change: sig .. end
val next_changes : t ->
(Change.t list, 'a) Unix_io.Deferred_result.t
module Killing_targets: sig .. end
module Adding_targets: sig .. end
module Synchronize: sig .. end