File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -988,6 +988,43 @@ type JobInfo struct {
988988 OnMergeBase bool
989989}
990990
991+ type AIJobPollReq struct {
992+ Namespaces []string
993+ Workflows []AIWorkflow
994+ }
995+
996+ type AIWorkflow struct {
997+ Type AIWorkflowType
998+ Name string
999+ }
1000+
1001+ type AIWorkflowType string
1002+
1003+ const (
1004+ AIPatching AIWorkflowType = "patching"
1005+ )
1006+
1007+ type AIJobPollResp struct {
1008+ ID string
1009+ Workflow AIWorkflow
1010+ // ... bug info ...
1011+ }
1012+
1013+ type AIJobJournalReq struct {
1014+ JobID string
1015+ //!!! what to do with retried/duplicated entries
1016+ //!!! Attempt int?
1017+ // ... entry info
1018+ }
1019+
1020+ func (dash * Dashboard ) AIJobPoll (req * AIJobPollReq ) (* AIJobPollResp , error ) {
1021+ resp := new (AIJobPollResp )
1022+ if err := dash .Query ("ai_job_poll" , req , resp ); err != nil {
1023+ return nil , err
1024+ }
1025+ return resp , nil
1026+ }
1027+
9911028func (dash * Dashboard ) Query (method string , req , reply interface {}) error {
9921029 if dash .logger != nil {
9931030 dash .logger ("API(%v): %#v" , method , req )
You can’t perform that action at this time.
0 commit comments