123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143(** The subset of the Current API that the RPC system needs.
This is duplicated here to avoid making RPC clients depend on
the "current" service implementation package. *)(** Active pipeline state. *)typeactive=[`Ready|`Running|`Waiting_for_confirmation](** Pipeline output type. *)type'aoutput=('a,[`Activeofactive|`Msgofstring])result(** Pipeline statistics (re-exported from current_term). *)typestats=Current_term.S.stats={ok:int;waiting_for_confirmation:int;ready:int;running:int;failed:int;blocked:int;}moduletypeCURRENT=sig(** The term type representing pipeline computations. *)type'atermclasstypeactions=objectmethodpp:Format.formatter->unitmethodrebuild:(unit->string)optionendmoduleJob:sigtypetmoduleMap:Map.Swithtypekey=stringvallog_path:string->(Fpath.t,[`Msgofstring])resultvallookup_running:string->toptionvalwait_for_log_data:t->unitLwt.tvalapprove_early_start:t->unitvalcancel:t->string->unitvalcancelled_state:t->(unit,[`Msgofstring])resultend(** Confirmation levels for operations. *)moduleLevel:sigtypetvalvalues:tlist(** All possible levels, in order. *)valto_string:t->stringvalof_string:string->(t,[>`Msgofstring])resultend(** Engine configuration. *)moduleConfig:sigtypetvalget_confirm:t->Level.toption(** Get the current confirmation threshold, if any. *)valset_confirm:t->Level.toption->unit(** Set the confirmation threshold. [None] means no confirmation required. *)end(** Pipeline metadata for jobs. *)moduleMetadata:sigtypet={job_id:stringoption;update:activeoption;}end(** Pipeline analysis module. *)moduleAnalysis:sigvalstat:'aterm->stats(** [stat t] returns statistics about the pipeline states. *)valpp_dot:env:(string*string)list->collapse_link:(k:string->v:string->stringoption)->job_info:(Metadata.t->activeoption*stringoption)->Format.formatter->'aterm->unit(** [pp_dot ~env ~collapse_link ~job_info ppf t] outputs the pipeline as a DOT graph. *)endmoduleEngine:sigtypettyperesults={value:unitoutput;jobs:actionsJob.Map.t;}valstate:t->resultsvalconfig:t->Config.t(** Get the engine configuration. *)valpipeline:t->unitterm(** [pipeline t] returns the current pipeline term. *)endend(** Database operations interface. This matches Current_cache.Db exactly
so applications can use it directly. *)moduletypeDB=sigtypeentry={job_id:string;build:int64;value:string;outcome:(string,[`Msgofstring])result;ready:float;running:floatoption;finished:float;rebuild:bool;}valquery:?op:string->?ok:bool->?rebuild:bool->?job_prefix:string->unit->entrylist(** Query job history with optional filters. *)valops:unit->stringlist(** List all known operation types. *)end(** A stub DB implementation that returns empty results.
@deprecated No longer used since Impl uses Current_cache.Db directly. *)moduleDb_stub:DB=structtypeentry={job_id:string;build:int64;value:string;outcome:(string,[`Msgofstring])result;ready:float;running:floatoption;finished:float;rebuild:bool;}letquery?op:_?ok:_?rebuild:_?job_prefix:_()=[]letops()=[]end