sig
module Command :
sig
type t = { host : Ketrew_pure.Host.t; action : Ketrew_pure.Program.t; }
val shell :
?host:Ketrew_pure.Host.t -> string -> Ketrew_pure.Target.Command.t
val program :
?host:Ketrew_pure.Host.t ->
Ketrew_pure.Program.t -> Ketrew_pure.Target.Command.t
val get_host : Ketrew_pure.Target.Command.t -> Ketrew_pure.Host.t
val log : Ketrew_pure.Target.Command.t -> Internal_pervasives.Log.t
val markup :
Ketrew_pure.Target.Command.t -> Internal_pervasives.Display_markup.t
val to_string_hum : Ketrew_pure.Target.Command.t -> string
end
module Volume :
sig
type structure =
[ `Directory of string * Ketrew_pure.Target.Volume.structure list
| `File of string ]
type t = {
host : Ketrew_pure.Host.t;
root : Ketrew_pure.Path.t;
structure : Ketrew_pure.Target.Volume.structure;
}
val create :
host:Ketrew_pure.Host.t ->
root:Ketrew_pure.Path.t ->
Ketrew_pure.Target.Volume.structure -> Ketrew_pure.Target.Volume.t
val file : string -> Ketrew_pure.Target.Volume.structure
val dir :
string ->
Ketrew_pure.Target.Volume.structure list ->
Ketrew_pure.Target.Volume.structure
val all_paths : Ketrew_pure.Target.Volume.t -> Ketrew_pure.Path.t list
val log_structure :
Ketrew_pure.Target.Volume.structure -> Internal_pervasives.Log.t
val log : Ketrew_pure.Target.Volume.t -> Internal_pervasives.Log.t
val markup :
Ketrew_pure.Target.Volume.t -> Internal_pervasives.Display_markup.t
val to_string_hum : Ketrew_pure.Target.Volume.t -> string
end
module Build_process :
sig
type t = [ `Long_running of string * string | `No_operation ]
val nop : Ketrew_pure.Target.Build_process.t
end
type id = Internal_pervasives.Unique_id.t
module Condition :
sig
type t =
[ `And of Ketrew_pure.Target.Condition.t list
| `Command_returns of Ketrew_pure.Target.Command.t * int
| `Never
| `Volume_exists of Ketrew_pure.Target.Volume.t
| `Volume_size_bigger_than of Ketrew_pure.Target.Volume.t * int ]
val log : Ketrew_pure.Target.Condition.t -> Internal_pervasives.Log.t
val to_string_hum : Ketrew_pure.Target.Condition.t -> string
val markup :
Ketrew_pure.Target.Condition.t ->
Internal_pervasives.Display_markup.t
end
module Equivalence : sig type t = [ `None | `Same_active_condition ] end
module State :
sig
type t
type simple = [ `Activable | `Failed | `In_progress | `Successful ]
val simple_to_yojson :
Ketrew_pure.Target.State.simple -> Yojson.Safe.json
val simple_of_yojson :
Yojson.Safe.json ->
Ketrew_pure.Target.State.simple Ppx_deriving_yojson_runtime.error_or
val pp_simple :
Format.formatter ->
Ketrew_pure.Target.State.simple -> Ppx_deriving_runtime.unit
val show_simple :
Ketrew_pure.Target.State.simple -> Ppx_deriving_runtime.string
val simplify :
Ketrew_pure.Target.State.t -> Ketrew_pure.Target.State.simple
val name : Ketrew_pure.Target.State.t -> string
type summary =
[ `Time of Internal_pervasives.Time.t ] *
[ `Log of string option ] * [ `Info of string list ]
val summary :
Ketrew_pure.Target.State.t -> Ketrew_pure.Target.State.summary
val log :
?depth:int -> Ketrew_pure.Target.State.t -> Internal_pervasives.Log.t
val passive_time :
Ketrew_pure.Target.State.t -> Internal_pervasives.Time.t
val finished_time :
Ketrew_pure.Target.State.t -> Internal_pervasives.Time.t option
module Is :
sig
val building : Ketrew_pure.Target.State.t -> bool
val tried_to_start : Ketrew_pure.Target.State.t -> bool
val started_running : Ketrew_pure.Target.State.t -> bool
val starting : Ketrew_pure.Target.State.t -> bool
val still_building : Ketrew_pure.Target.State.t -> bool
val still_running : Ketrew_pure.Target.State.t -> bool
val ran_successfully : Ketrew_pure.Target.State.t -> bool
val successfully_did_nothing : Ketrew_pure.Target.State.t -> bool
val active : Ketrew_pure.Target.State.t -> bool
val verified_success : Ketrew_pure.Target.State.t -> bool
val already_done : Ketrew_pure.Target.State.t -> bool
val dependencies_failed : Ketrew_pure.Target.State.t -> bool
val failed_running : Ketrew_pure.Target.State.t -> bool
val failed_to_kill : Ketrew_pure.Target.State.t -> bool
val failed_to_start : Ketrew_pure.Target.State.t -> bool
val killing : Ketrew_pure.Target.State.t -> bool
val tried_to_kill : Ketrew_pure.Target.State.t -> bool
val tried_to_eval_condition : Ketrew_pure.Target.State.t -> bool
val did_not_ensure_condition : Ketrew_pure.Target.State.t -> bool
val killed : Ketrew_pure.Target.State.t -> bool
val finished : Ketrew_pure.Target.State.t -> bool
val passive : Ketrew_pure.Target.State.t -> bool
val killable : Ketrew_pure.Target.State.t -> bool
val dependency_dead : Ketrew_pure.Target.State.t -> bool
val activated_by_user : Ketrew_pure.Target.State.t -> bool
val killed_from_passive : Ketrew_pure.Target.State.t -> bool
val failed_from_running : Ketrew_pure.Target.State.t -> bool
val failed_from_starting : Ketrew_pure.Target.State.t -> bool
val failed_from_condition : Ketrew_pure.Target.State.t -> bool
end
module Count :
sig
val consecutive_recent_attempts : Ketrew_pure.Target.State.t -> int
end
module Flat :
sig
type state = Ketrew_pure.Target.State.t
type item = private {
time : float;
simple : Ketrew_pure.Target.State.simple;
name : string;
message : string option;
more_info : string list;
finished : bool;
depth : int;
}
val item_to_yojson :
Ketrew_pure.Target.State.Flat.item -> Yojson.Safe.json
val item_of_yojson :
Yojson.Safe.json ->
Ketrew_pure.Target.State.Flat.item
Ppx_deriving_yojson_runtime.error_or
val time : Ketrew_pure.Target.State.Flat.item -> float
val simple :
Ketrew_pure.Target.State.Flat.item ->
Ketrew_pure.Target.State.simple
val name : Ketrew_pure.Target.State.Flat.item -> string
val message : Ketrew_pure.Target.State.Flat.item -> string option
val more_info : Ketrew_pure.Target.State.Flat.item -> string list
val finished : Ketrew_pure.Target.State.Flat.item -> bool
type t = private {
history : Ketrew_pure.Target.State.Flat.item list;
}
val to_yojson : Ketrew_pure.Target.State.Flat.t -> Yojson.Safe.json
val of_yojson :
Yojson.Safe.json ->
Ketrew_pure.Target.State.Flat.t
Ppx_deriving_yojson_runtime.error_or
val empty : unit -> Ketrew_pure.Target.State.Flat.t
val of_state :
Ketrew_pure.Target.State.Flat.state ->
Ketrew_pure.Target.State.Flat.t
val history :
Ketrew_pure.Target.State.Flat.t ->
Ketrew_pure.Target.State.Flat.item list
val latest :
Ketrew_pure.Target.State.Flat.t ->
Ketrew_pure.Target.State.Flat.item option
val since :
Ketrew_pure.Target.State.Flat.t ->
float -> Ketrew_pure.Target.State.Flat.t option
val merge :
Ketrew_pure.Target.State.Flat.t ->
Ketrew_pure.Target.State.Flat.t ->
Ketrew_pure.Target.State.Flat.t
end
end
type t
val to_yojson : Ketrew_pure.Target.t -> Yojson.Safe.json
val of_yojson :
Yojson.Safe.json ->
Ketrew_pure.Target.t Ppx_deriving_yojson_runtime.error_or
val create :
?id:Ketrew_pure.Target.id ->
?name:string ->
?metadata:[ `String of string ] ->
?depends_on:Ketrew_pure.Target.id list ->
?on_failure_activate:Ketrew_pure.Target.id list ->
?on_success_activate:Ketrew_pure.Target.id list ->
?make:Ketrew_pure.Target.Build_process.t ->
?condition:Ketrew_pure.Target.Condition.t ->
?equivalence:Ketrew_pure.Target.Equivalence.t ->
?tags:string list -> unit -> Ketrew_pure.Target.t
val rekey : prefix:string -> Ketrew_pure.Target.t -> Ketrew_pure.Target.t
val id : Ketrew_pure.Target.t -> Internal_pervasives.Unique_id.t
val name : Ketrew_pure.Target.t -> string
val depends_on : Ketrew_pure.Target.t -> Ketrew_pure.Target.id list
val on_success_activate :
Ketrew_pure.Target.t -> Ketrew_pure.Target.id list
val on_failure_activate :
Ketrew_pure.Target.t -> Ketrew_pure.Target.id list
val metadata : Ketrew_pure.Target.t -> [ `String of string ] option
val build_process :
Ketrew_pure.Target.t -> Ketrew_pure.Target.Build_process.t
val condition :
Ketrew_pure.Target.t -> Ketrew_pure.Target.Condition.t option
val equivalence : Ketrew_pure.Target.t -> Ketrew_pure.Target.Equivalence.t
val additional_log :
Ketrew_pure.Target.t -> (Internal_pervasives.Time.t * string) list
val tags : Ketrew_pure.Target.t -> string list
val state : Ketrew_pure.Target.t -> Ketrew_pure.Target.State.t
module Automaton :
sig
type failure_reason
type progress = [ `Changed_state | `No_change ]
type 'a transition_callback =
?log:string ->
'a -> Ketrew_pure.Target.t * Ketrew_pure.Target.Automaton.progress
type severity = [ `Fatal | `Try_again ]
type bookkeeping = { plugin_name : string; run_parameters : string; }
type long_running_failure =
Ketrew_pure.Target.Automaton.severity * string *
Ketrew_pure.Target.Automaton.bookkeeping
type long_running_action =
(Ketrew_pure.Target.Automaton.bookkeeping,
Ketrew_pure.Target.Automaton.long_running_failure)
Pvem.Result.t
type process_check =
[ `Still_running of Ketrew_pure.Target.Automaton.bookkeeping
| `Successful of Ketrew_pure.Target.Automaton.bookkeeping ]
type process_status_check =
(Ketrew_pure.Target.Automaton.process_check,
Ketrew_pure.Target.Automaton.long_running_failure)
Pvem.Result.t
type condition_evaluation =
(bool, Ketrew_pure.Target.Automaton.severity * string)
Pvem.Result.t
type dependencies_status =
[ `All_succeeded
| `At_least_one_failed of Ketrew_pure.Target.id list
| `Still_processing ]
type transition =
[ `Activate of
Ketrew_pure.Target.id list *
unit Ketrew_pure.Target.Automaton.transition_callback
| `Check_and_activate_dependencies of
Ketrew_pure.Target.Automaton.dependencies_status
Ketrew_pure.Target.Automaton.transition_callback
| `Check_process of
Ketrew_pure.Target.Automaton.bookkeeping *
Ketrew_pure.Target.Automaton.process_status_check
Ketrew_pure.Target.Automaton.transition_callback
| `Do_nothing of
unit Ketrew_pure.Target.Automaton.transition_callback
| `Eval_condition of
Ketrew_pure.Target.Condition.t *
Ketrew_pure.Target.Automaton.condition_evaluation
Ketrew_pure.Target.Automaton.transition_callback
| `Kill of
Ketrew_pure.Target.Automaton.bookkeeping *
Ketrew_pure.Target.Automaton.long_running_action
Ketrew_pure.Target.Automaton.transition_callback
| `Start_running of
Ketrew_pure.Target.Automaton.bookkeeping *
Ketrew_pure.Target.Automaton.long_running_action
Ketrew_pure.Target.Automaton.transition_callback ]
val transition :
Ketrew_pure.Target.t -> Ketrew_pure.Target.Automaton.transition
end
val activate_exn :
?log:string ->
Ketrew_pure.Target.t ->
reason:[ `Dependency of Ketrew_pure.Target.id | `User ] ->
Ketrew_pure.Target.t
val kill :
?log:string -> Ketrew_pure.Target.t -> Ketrew_pure.Target.t option
val reactivate :
?with_id:Ketrew_pure.Target.id ->
?with_name:string ->
?with_metadata:[ `String of string ] option ->
?log:string -> Ketrew_pure.Target.t -> Ketrew_pure.Target.t
val is_equivalent : Ketrew_pure.Target.t -> Ketrew_pure.Target.t -> bool
val log : Ketrew_pure.Target.t -> Internal_pervasives.Log.t
val latest_run_parameters : Ketrew_pure.Target.t -> string option
module Stored_target :
sig
type target = Ketrew_pure.Target.t
type t
val to_json :
Ketrew_pure.Target.Stored_target.t -> Internal_pervasives.Json.t
val serialize : Ketrew_pure.Target.Stored_target.t -> string
val deserialize :
string ->
(Ketrew_pure.Target.Stored_target.t,
[> `Target of [> `Deserilization of string ] ])
Internal_pervasives.Result.t
val get_target :
Ketrew_pure.Target.Stored_target.t ->
[ `Pointer of Ketrew_pure.Target.id
| `Target of Ketrew_pure.Target.Stored_target.target ]
val of_target :
Ketrew_pure.Target.Stored_target.target ->
Ketrew_pure.Target.Stored_target.t
val is_pointer : Ketrew_pure.Target.Stored_target.t -> bool
val id : Ketrew_pure.Target.Stored_target.t -> Ketrew_pure.Target.id
val name : Ketrew_pure.Target.Stored_target.t -> string
val tags : Ketrew_pure.Target.Stored_target.t -> string list
val make_pointer :
from:Ketrew_pure.Target.Stored_target.target ->
pointing_to:Ketrew_pure.Target.Stored_target.target ->
Ketrew_pure.Target.Stored_target.t
end
module Summary :
sig
type full_target = Ketrew_pure.Target.t
type t
val to_yojson : Ketrew_pure.Target.Summary.t -> Yojson.Safe.json
val of_yojson :
Yojson.Safe.json ->
Ketrew_pure.Target.Summary.t Ppx_deriving_yojson_runtime.error_or
val create :
Ketrew_pure.Target.Summary.full_target ->
Ketrew_pure.Target.Summary.t
val id :
Ketrew_pure.Target.Summary.t -> Internal_pervasives.Unique_id.t
val name : Ketrew_pure.Target.Summary.t -> string
val depends_on :
Ketrew_pure.Target.Summary.t -> Ketrew_pure.Target.id list
val on_success_activate :
Ketrew_pure.Target.Summary.t -> Ketrew_pure.Target.id list
val on_failure_activate :
Ketrew_pure.Target.Summary.t -> Ketrew_pure.Target.id list
val metadata :
Ketrew_pure.Target.Summary.t -> [ `String of string ] option
val build_process :
Ketrew_pure.Target.Summary.t -> Ketrew_pure.Target.Build_process.t
val condition :
Ketrew_pure.Target.Summary.t -> Ketrew_pure.Target.Condition.t option
val equivalence :
Ketrew_pure.Target.Summary.t -> Ketrew_pure.Target.Equivalence.t
val tags : Ketrew_pure.Target.Summary.t -> string list
end
end