2024-08-03 13:08:46 +02:00
|
|
|
#ifndef SCI_PIPELINE_H
|
|
|
|
#define SCI_PIPELINE_H
|
|
|
|
#include "optional.h"
|
|
|
|
#include <pthread.h>
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
char* name;
|
|
|
|
char* url;
|
|
|
|
char* trigger;
|
|
|
|
char* command;
|
|
|
|
} pipeline_conf;
|
|
|
|
typedef optional_type(pipeline_conf*) optional_pipeline_conf;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
const struct inotify_event* event;
|
2024-08-06 18:38:42 +02:00
|
|
|
char* name;
|
|
|
|
char* url;
|
|
|
|
char* trigger;
|
|
|
|
char* command;
|
2024-08-03 13:08:46 +02:00
|
|
|
} pipeline_event;
|
|
|
|
|
|
|
|
// create a new pipeline_conf struct instance based on a configuration line.
|
|
|
|
optional_pipeline_conf pipeline_create(const char* config_line);
|
|
|
|
void pipeline_register(pthread_t thread);
|
|
|
|
void pipeline_loop();
|
|
|
|
|
|
|
|
#endif
|