summaryrefslogtreecommitdiff
path: root/common/include/kafka.h
blob: ffb9911ff4af672ddf6d0878e1fd7e88a0459dc8 (plain)
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
#ifndef _KAFKA_H
#define _KAFKA_H

#ifdef __cplusplus
extern "C"
{
#endif

enum topic_idx
{
	TOPIC_RULE_HITS,

	// add more topic here

	MAX_TOPIC_NUM,
};

struct kafka *kafka_create(const char *profile);
void kafka_destroy(struct kafka *handle);
// return  0: if success
// return -1: if failed
int kafka_send(struct kafka *handle, enum topic_idx idx, const char *data, int len);

#ifdef __cplusplus
}
#endif

#endif