Module Ketrew_target.Automaton (.ml)

module Automaton: sig .. end


A pure automaton
type failure_reason 
type progress = [ `Changed_state | `No_change ] 
type 'a transition_callback = ?log:string -> 'a -> Ketrew_target.t * progress 
type severity = [ `Fatal | `Try_again ] 
type bookkeeping = {
   plugin_name : string;
   run_parameters : string;
}
type long_running_failure = severity * string *
bookkeeping
type long_running_action = (bookkeeping,
long_running_failure)
Pvem.Result.t
type process_check = [ `Still_running of bookkeeping
| `Successful of bookkeeping ]
type process_status_check = (process_check,
long_running_failure)
Pvem.Result.t
type condition_evaluation = (bool, severity * string) Pvem.Result.t 
type dependencies_status = [ `All_succeeded
| `At_least_one_failed of Ketrew_target.id list
| `Still_processing ]
type transition = [ `Activate of
Ketrew_target.id list * unit transition_callback
| `Check_and_activate_dependencies of
dependencies_status
transition_callback
| `Check_process of
bookkeeping *
process_status_check
transition_callback
| `Do_nothing of unit transition_callback
| `Eval_condition of
Ketrew_target.Condition.t *
condition_evaluation
transition_callback
| `Kill of
bookkeeping *
long_running_action
transition_callback
| `Start_running of
bookkeeping *
long_running_action
transition_callback ]
val transition : Ketrew_target.t -> transition