Modern C++ Kafka API
ClientCommon.h
1 #pragma once
2 
3 #include <chrono>
4 #include <kafka/Project.h>
5 
6 #include <kafka/Error.h>
7 
8 #include <functional>
9 
10 
11 namespace KAFKA_API { namespace clients {
12 
16  using LogCallback = std::function<void(int, const char*, int, const char* msg)>;
17 
21  using ErrorCallback = std::function<void(const Error&)>;
22 
26  using StatsCallback = std::function<void(const std::string&)>;
27 
32  {
33  using KeyValuePairs = std::map<std::string, std::string>;
34 
35  std::string value;
36  std::chrono::milliseconds mdLifetime{};
37  std::string mdPrincipalName;
38  KeyValuePairs extensions;
39  };
40 
44  using OauthbearerTokenRefreshCallback = std::function<SaslOauthbearerToken(const std::string&)>;
45 
46 } } // end of KAFKA_API::clients
47 
SASL OAUTHBEARER token info.
Definition: ClientCommon.h:32