-
Notifications
You must be signed in to change notification settings - Fork 1
/
module.h
33 lines (27 loc) · 1.06 KB
/
module.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* ======================================================================
* Copyright (c) 2006 Theo Schlossnagle
* All rights reserved.
* The following code was written by Theo Schlossnagle <[email protected]>
* This code was written to facilitate clustered logging via Spread.
* More information on Spread can be found at http://www.spread.org/
* Please refer to the LICENSE file before using this software.
* ======================================================================
*/
#ifndef _SLD_MODULE_H
#define _SLD_MODULE_H
#include "sld_config.h"
typedef int (*ModuleInit)(const char *);
typedef void (*ModuleLogLine)(SpreadConfiguration *,
const char *, const char *, const char *);
typedef void (*ModuleShutdown)();
typedef struct sld_module_abi {
char *module_name;
ModuleInit init;
ModuleLogLine logline;
ModuleShutdown shutdown;
} sld_module_abi_t;
void module_init();
void module_load(const char *symbol, const char *config);
int module_load_finalize();
sld_module_abi_t *module_get(const char *symbol);
#endif