#if !defined(_XCEAPI_H_) #define _XCEAPI_H_ 1 #include "config.h" #include "xce/types.h" #include "xcectx.h" extern int xce_hello(xce_ctx_t*, char*); extern int xce_nop(xce_ctx_t*); extern int xce_heartbeat(xce_ctx_t*, int); extern int xce_shutdown(xce_ctx_t*); extern int xce_reslist(xce_ctx_t*, xce_resource_t***); extern int xce_join(xce_ctx_t*, int, hostattrs_t*); extern int xce_workerlist(xce_ctx_t*, xce_worker_t***); extern int xce_jobdispatch(xce_ctx_t*, xce_job_dispatch_t*); extern int xce_jobsubmit(xce_ctx_t*, xce_job_submit_t*, uint64_t*); extern int xce_joblist(xce_ctx_t*, xce_job_t***); extern int xce_clusterconf(xce_ctx_t*, xce_clusterconf_t**); extern int xce_ctrlstatus(xce_ctx_t*, xce_ctrlstatus_t**); extern int xce_push(xce_ctx_t*, xce_check_fn_t, void*, int, int, int, void**); extern int xce_update_rows(xce_ctx_t*, int, int, xlist_t*); extern int xce_resval(xce_ctx_t*, char*, char*, xce_resval_t***); extern int xce_notify(xce_ctx_t*, xce_notify_data_t*); extern int xce_update_resvals(xce_ctx_t*, int, xce_resval_t**); extern int xce_jobctrl(xce_ctx_t*, xce_jobctrl_t*); extern int xce_queuectrl(xce_ctx_t*, xce_queuectrl_t*); extern int xce_hostctrl(xce_ctx_t*, xce_hostctrl_t*); /* xce_upgradeconfig: send OP_upgradeConfig (sha256 + serialised ClusterConfig * blob) via xce_upgradeconfig_req_raw and wait for the reply. Returns the * server's reply status (0 on success; a negative errno/E_XCE_* code on * failure — the server logs the human-readable reason, see * do_upgrade_config_with_bytes/send_upgrade_error, config_repl.c). Mirrors * xce_hostctrl/xce_queuectrl's shape; the richer UpgradeConfigReply fields * (version_tag/acked_count/error text) are not surfaced to the caller — no * consumer of this API currently needs them beyond success/failure. */ extern int xce_upgradeconfig(xce_ctx_t*, const uint8_t *sha256, size_t sha256_len, const uint8_t *bytes, size_t bytes_len); extern int xce_runtask(xce_ctx_t*, xce_taskrun_t*); extern int xce_update_jusage(xce_ctx_t*, uint64_t, int, int*, int, int*, int, xce_rusage_t**); 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