-
Notifications
You must be signed in to change notification settings - Fork 402
/
Copy pathconfig.h
43 lines (33 loc) · 1.01 KB
/
config.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
34
35
36
37
38
39
40
41
42
43
/*
* node-rdkafka - Node.js wrapper for RdKafka C/C++ library
*
* Copyright (c) 2016 Blizzard Entertainment
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE.txt file for details.
*/
#ifndef SRC_CONFIG_H_
#define SRC_CONFIG_H_
#include <nan.h>
#include <iostream>
#include <vector>
#include <list>
#include <string>
#include "rdkafkacpp.h"
#include "src/common.h"
#include "src/callbacks.h"
namespace NodeKafka {
class Conf : public RdKafka::Conf {
public:
~Conf();
static Conf* create(RdKafka::Conf::ConfType, v8::Local<v8::Object>, std::string &); // NOLINT
static void DumpConfig(std::list<std::string> *);
void listen();
void stop();
void ConfigureCallback(const std::string &string_key, const v8::Local<v8::Function> &cb, bool add, std::string &errstr);
protected:
NodeKafka::Callbacks::Rebalance * m_rebalance_cb = NULL;
NodeKafka::Callbacks::OffsetCommit * m_offset_commit_cb = NULL;
};
} // namespace NodeKafka
#endif // SRC_CONFIG_H_