Initial commit. It's far from finished.
This commit is contained in:
30
agent/job.h
Normal file
30
agent/job.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef JOB_H
|
||||
#define JOB_H
|
||||
|
||||
#include "agent_ssl.h"
|
||||
#include "../protocol.h"
|
||||
|
||||
enum pthread_state { WAIT, WORK };
|
||||
enum job_slot_state { FREE, FULL };
|
||||
|
||||
struct job_args {
|
||||
struct msg buf;
|
||||
unsigned short slot;
|
||||
SSL *ssl;
|
||||
};
|
||||
|
||||
void* exec_unix(void *args);
|
||||
void* install_pkg(void *args);
|
||||
void* query_pkg(void *args);
|
||||
void* delete_pkg(void *args);
|
||||
void* list_pkgs(void *args);
|
||||
void* update_pkg(void *args);
|
||||
void* update_pkgs(void *args);
|
||||
void* get_os(void *args);
|
||||
void* get_kernel(void *args);
|
||||
void* get_uptime(void *args);
|
||||
void* get_memory(void *args);
|
||||
|
||||
#define MAX_AGENT_JOBS 10
|
||||
|
||||
#endif /* JOB_H */
|
||||
Reference in New Issue
Block a user