Init commit of jobs output/error message peek project.

This commit is contained in:
Lei Chen 2026-05-09 16:57:54 +08:00
parent c772d7e601
commit d2b47e3985
38 changed files with 2267 additions and 21 deletions

View file

@ -75,4 +75,7 @@ extern int xcecli_jobinfo(xcecli_ctx_t, uint64_t, xce_job_t**);
#define xcecli_free_groups(ngroups, groups) xce_free_groups(ngroups, groups)
#define xcecli_free_clusterconf(conf) xce_free_clusterconf(conf)
extern int xcecli_reply_fetchfile(xcecli_ctx_t, xce_request_t*, xce_fetchfile_reply_t*);
extern int xcecli_fetchfile(xcecli_ctx_t, xce_fetchfile_t*, xce_fetchfile_reply_t**);
#endif

View file

@ -35,4 +35,6 @@ extern void cbuf_fini(cbuf_t*);
extern int cbuf_put(cbuf_t*, void*);
extern int cbuf_tryput(cbuf_t*, void*);
extern int cbuf_get(cbuf_t*, void*);
extern int cbuf_tryget(cbuf_t*, void*);
extern int cbuf_timedget(cbuf_t*, void*, const struct timespec*);
#endif

View file

@ -58,5 +58,6 @@ extern int xce_hostctrl_req(endpoint_t*, xce_hostctrl_t*);
extern int xce_runtask_req(endpoint_t*, xce_taskrun_t*);
extern int xce_set_pend_reason_req(endpoint_t*, xce_preason_set_t*);
extern int xce_clear_reason_req(endpoint_t*, xce_clear_reason_t*);
extern int xce_fetchfile_req(endpoint_t*, xce_fetchfile_t*);
#endif

View file

@ -170,6 +170,7 @@ typedef struct {
uint64_t jobid;
xce_data_t* getdata;
xce_clusterconf_t* clusterconf;
xce_fetchfile_reply_t* fetchfilereply;
} data;
} xce_reply_t;
@ -197,6 +198,7 @@ typedef struct {
xce_preason_set_t* preasonmsg;
xce_clear_reason_t* clrpreasonmsg;
xce_hostctrl_t* hostctrlmsg;
xce_fetchfile_t* fetchfilemsg;
} body;
} xce_request_t;

View file

@ -773,4 +773,19 @@ typedef struct {
xce_limit_t* limit;
} xce_vres_t;
typedef struct {
uint64_t jobid;
char* filepath;
uint64_t offset;
uint32_t max_bytes;
} xce_fetchfile_t;
typedef struct {
int32_t error;
uint8_t* content;
uint64_t file_size;
uint32_t bytes_read;
uint64_t jobid; /* echoed from request for pending-request matching */
} xce_fetchfile_reply_t;
#endif

View file

@ -33,5 +33,6 @@ extern int xce_update_jusage(xce_ctx_t*, uint64_t, int, int*, int, int*, int,
extern int xce_set_pend_reason(xce_ctx_t*, xce_preason_set_t*);
extern int xce_clear_reason(xce_ctx_t*, xce_clear_reason_t*);
extern int xce_jobinfo(xce_ctx_t*, uint64_t, xce_job_t**);
extern int xce_fetchfile(xce_ctx_t*, xce_fetchfile_t*, xce_fetchfile_reply_t**);
#endif

View file

@ -30,10 +30,11 @@ typedef struct {
struct {
union {
char* debugmsg;
dataset_t* get;
uint64_t jobid;
xce_clusterconf_t* clusterconf;
char* debugmsg;
dataset_t* get;
uint64_t jobid;
xce_clusterconf_t* clusterconf;
xce_fetchfile_reply_t* fetchfilereply;
} u;
} reply;
} xce_ctx_t;