mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-01 02:57:53 +00:00
30 lines
729 B
C++
30 lines
729 B
C++
#ifndef CPPKAFKA_TOPIC_CONFIGURATION_H
|
|
#define CPPKAFKA_TOPIC_CONFIGURATION_H
|
|
|
|
#include <string>
|
|
#include <librdkafka/rdkafka.h>
|
|
#include "clonable_ptr.h"
|
|
|
|
namespace cppkafka {
|
|
|
|
class TopicConfiguration {
|
|
public:
|
|
TopicConfiguration();
|
|
|
|
void set(const std::string& name, const std::string& value);
|
|
|
|
rd_kafka_topic_conf_t* get_handle() const;
|
|
private:
|
|
using HandlePtr = ClonablePtr<rd_kafka_topic_conf_t, decltype(&rd_kafka_topic_conf_destroy),
|
|
decltype(&rd_kafka_topic_conf_dup)>;
|
|
|
|
TopicConfiguration(rd_kafka_topic_conf_t* ptr);
|
|
static HandlePtr make_handle(rd_kafka_topic_conf_t* ptr);
|
|
|
|
HandlePtr handle_;
|
|
};
|
|
|
|
} // cppkafka
|
|
|
|
#endif // CPPKAFKA_TOPIC_CONFIGURATION_H
|