Module Ketrew.Persistent_data

module Persistent_data: sig .. end

type t 
module Error: sig .. end
val create : database_parameters:string ->
(t,
[> `Database of Error.database ])
Unix_io.Deferred_result.t
Connect to the Postgresql database and initialize it (if needed).
val unload : t ->
(unit, [> `Database of Error.database ])
Unix_io.Deferred_result.t
Close the connection to the DB.
val get_target : t ->
Ketrew_pure.Target.id ->
(Ketrew_pure.Target.t,
[> `Database of Error.database ])
Unix_io.Deferred_result.t
Get the node at a given ID, the function actually “follows pointers” i.e. it gets the node considered by Ketrew after equivalence matching.
val query_nodes : ?max_nodes:int ->
t ->
Ketrew_pure.Protocol.Up_message.target_query ->
(Ketrew_pure.Target.t list,
[> `Database of Error.database ])
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 Error.database ])
Unix_io.Deferred_result.t
Register a node as “Active” (i.e. to be picked-up by the engine at the next step, using Ketrew.Persistent_data.fold_active_targets).
val fold_active_targets : limit:< items : int; not_seen_for : float > ->
t ->
init:'a ->
f:('a ->
target:Ketrew_pure.Target.t ->
('a,
[> `Database of Error.database ]
as 'combined_errors)
Unix_io.Deferred_result.t) ->
('a, 'combined_errors) Unix_io.Deferred_result.t
Go through all the active nodes.
val update_target : t ->
Ketrew_pure.Target.t ->
(unit, [> `Database of Error.database ])
Unix_io.Deferred_result.t
val find_all_orphans : t ->
(Ketrew_pure.Target.t list,
[> `Database of Error.database ])
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