aboutsummaryrefslogtreecommitdiffstats
path: root/v3/glougloud/glougloud.h
blob: 334fe17971bc74b7ec7ee1d130ab53439de288e1 (plain) (blame)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
 * Public header for glougloud and glougloud modules
 * (both probes and viz modules)
 */

#if defined(__OpenBSD__)
#include <sys/queue.h>
#else
#include <bsd/sys/queue.h>
#endif

#include <dnet.h>

struct glougloud {
	int daemonize;
	char *logfile;
	int loglevel;
	int pid;
	struct {
		char *socket;
		char *socket_chrooted;
	} redis;
	struct {
		struct addr serv_ip;
		int serv_port;
	} probes;
	struct {
		struct addr serv_ip;
		int serv_port;
	} viz;
};

enum ggdviz_cli_type {
	GGDVIZ_CLI_TCP = 0,
	GGDVIZ_CLI_WS = 1
};

struct ggdviz_cli {
	LIST_ENTRY(ggdviz_cli) entry;
	int id;
	enum ggdviz_cli_type type;
	union {
		struct {
			struct bufferevent *bev;
			struct addr addr;
		} tcp;
	};
};

struct ggdprobe_cli {
    LIST_ENTRY(ggprobe_cli) entry;
    int id;
};

struct ggdmodviz_conf {
    int id;
    int api_version;
};