use nix build & meson & zlog
This commit is contained in:
parent
0123623742
commit
346768a144
60 changed files with 13739 additions and 0 deletions
82
src/include/request.h
Normal file
82
src/include/request.h
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
#if !defined(_REQUEST_H_)
|
||||
|
||||
#define _REQUEST_H_ 1
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "netio.h"
|
||||
#include "typemap.h"
|
||||
#include "utils.h"
|
||||
#include "xce/types.h"
|
||||
|
||||
typedef struct {
|
||||
int wait;
|
||||
} reqbar_t;
|
||||
|
||||
typedef struct {
|
||||
data_item_t link;
|
||||
endpoint_t* ep;
|
||||
xce_peerinfo_t* from;
|
||||
io_packet_t pkt;
|
||||
struct capn c;
|
||||
struct Request rq;
|
||||
uint32_t nrefs;
|
||||
} ioctx_t;
|
||||
|
||||
#define ITPTR_TO_IOCTX(p) \
|
||||
((ioctx_t*)(((char*)p) - offsetof(ioctx_t, link)))
|
||||
|
||||
typedef int (*xce_check_fn_t)(void*);
|
||||
|
||||
extern ioctx_t* ioctx_alloc(endpoint_t*, xce_peerinfo_t*);
|
||||
extern int ioctx_ref(ioctx_t*);
|
||||
extern void ioctx_deref(ioctx_t*, int);
|
||||
extern int ioctx_flush(ioctx_t*, int);
|
||||
extern int ioctx_encode(ioctx_t*, xce_request_t*);
|
||||
extern int ioctx_decode(ioctx_t*, xce_request_t*);
|
||||
|
||||
extern int xce_reply(endpoint_t*, xce_peerinfo_t*, xce_reply_t*);
|
||||
extern int xce_hello_req(ioctx_t*, char*);
|
||||
extern int xce_nop_req(ioctx_t*);
|
||||
extern int xce_shutdown_req(ioctx_t*);
|
||||
extern void init_reply_by_req(xce_reply_t*, xce_request_t*);
|
||||
extern int xce_join_req(ioctx_t*, int, hostattrs_t*);
|
||||
extern int xce_pushconfig_req(endpoint_t*,
|
||||
xce_peerinfo_t*,
|
||||
xce_configdata_t*);
|
||||
extern int xce_push_data_req(endpoint_t*, xce_peerinfo_t*,
|
||||
xce_data_t*, xce_check_fn_t,
|
||||
void*, int);
|
||||
|
||||
extern int xce_workerlist_req(ioctx_t*, xce_peerinfo_t*);
|
||||
extern int xce_reply_workerlist(endpoint_t*, uint64_t, int,
|
||||
xce_peerinfo_t*, xce_workerlist_t*);
|
||||
extern int xce_jobdispatch_req(ioctx_t*, xce_job_dispatch_t*);
|
||||
extern int xce_jobsubmit_req(ioctx_t*, xce_job_submit_t*);
|
||||
extern int xce_reply_jobdispatch(endpoint_t*, uint64_t, int32_t,
|
||||
xce_peerinfo_t*);
|
||||
extern int xce_reply_jobid(endpoint_t*, int,
|
||||
uint64_t, uint64_t,
|
||||
xce_peerinfo_t*);
|
||||
extern int xce_joblist_req(ioctx_t*, xce_peerinfo_t*);
|
||||
extern int xce_reply_joblist(endpoint_t*, uint64_t, int,
|
||||
xce_peerinfo_t*, xce_job_list_t*);
|
||||
extern int xce_startjob_req(ioctx_t*, xce_job_exec_t*);
|
||||
extern int xce_clusterconf_req(ioctx_t*);
|
||||
extern int xce_reply_clusterconf(endpoint_t*, uint64_t, int,
|
||||
xce_peerinfo_t*,
|
||||
xce_clusterconf_t*);
|
||||
extern int xce_get_req(ioctx_t*, xce_get_t*);
|
||||
extern int xce_reply_get(endpoint_t*, xce_peerinfo_t*,
|
||||
xce_reply_t*, xce_check_fn_t,
|
||||
void*, int);
|
||||
extern int xce_notify_req(ioctx_t*, xce_notify_data_t*);
|
||||
extern int extract_data(dataset_t*, xce_data_t*);
|
||||
extern int xce_update_req(ioctx_t*, xce_update_data_t*);
|
||||
extern int xce_jobctrl_req(ioctx_t*, xce_jobctrl_t*);
|
||||
extern int xce_queuectrl_req(ioctx_t*, xce_queuectrl_t*);
|
||||
extern int xce_runtask_req(ioctx_t* , xce_taskrun_t *) ;
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue