mirror of https://github.com/fede1024/rust-rdkafka
rdkafka-sys: upgrade librdkafka to v1.9.2
This commit is contained in:
parent
5f9cb6f9e0
commit
86c8470d00
|
@ -29,10 +29,13 @@ jobs:
|
|||
include:
|
||||
- os: macos-11.0
|
||||
- os: windows-2019
|
||||
features: cmake-build,libz-static
|
||||
rdkafka-sys-features: cmake-build,libz-static
|
||||
features: cmake-build,libz-static,curl-static
|
||||
rdkafka-sys-features: cmake-build,libz-static,curl-static
|
||||
- os: ubuntu-20.04
|
||||
features: tracing
|
||||
- os: ubuntu-20.04
|
||||
features: cmake-build,ssl-vendored,gssapi-vendored,libz-static,curl-static,zstd
|
||||
rdkafka-sys-features: cmake-build,ssl-vendored,gssapi-vendored,libz-static,curl-static,zstd
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[submodule "librdkafka"]
|
||||
[submodule "rdkafka-sys/librdkafka"]
|
||||
path = rdkafka-sys/librdkafka
|
||||
url = https://github.com/benesch/librdkafka.git
|
||||
url = https://github.com/edenhill/librdkafka
|
||||
|
|
|
@ -395,6 +395,21 @@ dependencies = [
|
|||
"lazy_static",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "curl-sys"
|
||||
version = "0.4.55+curl-7.83.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23734ec77368ec583c2e61dd3f0b0e5c98b93abe6d2a004ca06b91dd7e3e2762"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
"libz-sys",
|
||||
"openssl-sys",
|
||||
"pkg-config",
|
||||
"vcpkg",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derivative"
|
||||
version = "2.1.1"
|
||||
|
@ -1084,9 +1099,10 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rdkafka-sys"
|
||||
version = "4.2.0+1.8.2"
|
||||
version = "4.3.0+1.9.2"
|
||||
dependencies = [
|
||||
"cmake",
|
||||
"curl-sys",
|
||||
"libc",
|
||||
"libz-sys",
|
||||
"lz4-sys",
|
||||
|
|
|
@ -15,7 +15,7 @@ exclude = ["Cargo.lock"]
|
|||
members = ["rdkafka-sys"]
|
||||
|
||||
[dependencies]
|
||||
rdkafka-sys = { path = "rdkafka-sys", version = "4.2.0", default-features = false }
|
||||
rdkafka-sys = { path = "rdkafka-sys", version = "4.3.0", default-features = false }
|
||||
futures-channel = "0.3.0"
|
||||
futures-executor = { version = "0.3.0", optional = true }
|
||||
futures-util = { version = "0.3.0", default-features = false }
|
||||
|
@ -58,6 +58,8 @@ gssapi-vendored = ["rdkafka-sys/gssapi-vendored"]
|
|||
sasl = ["rdkafka-sys/sasl"]
|
||||
libz = ["rdkafka-sys/libz"]
|
||||
libz-static = ["rdkafka-sys/libz-static"]
|
||||
curl = ["rdkafka-sys/curl"]
|
||||
curl-static = ["rdkafka-sys/curl-static"]
|
||||
zstd = ["rdkafka-sys/zstd"]
|
||||
zstd-pkg-config = ["rdkafka-sys/zstd-pkg-config"]
|
||||
external-lz4 = ["rdkafka-sys/external-lz4"]
|
||||
|
|
|
@ -12,7 +12,7 @@ library for Rust based on [librdkafka].
|
|||
## The library
|
||||
|
||||
`rust-rdkafka` provides a safe Rust interface to librdkafka. The master
|
||||
branch is currently based on librdkafka 1.8.2.
|
||||
branch is currently based on librdkafka 1.9.0.
|
||||
|
||||
### Documentation
|
||||
|
||||
|
@ -159,6 +159,7 @@ your executable. To compile librdkafka you'll need:
|
|||
* GNU `make`
|
||||
* `pthreads`
|
||||
* `zlib`: optional, but included by default (feature: `libz`)
|
||||
* `curl`: optional, but included by default (feature: `curl`)
|
||||
* `cmake`: optional, *not* included by default (feature: `cmake-build`)
|
||||
* `libssl-dev`: optional, *not* included by default (feature: `ssl`)
|
||||
* `libsasl2-dev`: optional, *not* included by default (feature: `gssapi`)
|
||||
|
|
|
@ -1,17 +1,25 @@
|
|||
# Maintainer and contributor instructions
|
||||
|
||||
## Bindings
|
||||
## Upgrading librdkafka
|
||||
|
||||
To regenerate the bindings:
|
||||
To update to a new version of librdkafka:
|
||||
|
||||
``` bash
|
||||
git submodule update --init
|
||||
cargo install bindgen
|
||||
cd rdkafka-sys/librdkafka
|
||||
git checkout $DESIRED_VERSION
|
||||
cargo install bindgen-cli
|
||||
./update-bindings.sh
|
||||
```
|
||||
|
||||
## Updating
|
||||
Then:
|
||||
|
||||
To upgrade change the git submodule in `librdkafka`, check if new errors need to
|
||||
be added to `helpers::primive_to_rd_kafka_resp_err_t` and update the version in
|
||||
`Cargo.toml`.
|
||||
* Add a changelog entry to rdkafka-sys/changelog.md.
|
||||
* Update src/lib.rs with the new version.
|
||||
|
||||
## Releasing
|
||||
|
||||
* Ensure the changelog is up to date.
|
||||
* Ensure Cargo.toml is up to date.
|
||||
* Run `cd rdkafka-sys && ../generate_readme.py > README.md`
|
||||
* Run `cargo publish`.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "rdkafka-sys"
|
||||
version = "4.2.0+1.8.2"
|
||||
version = "4.3.0+1.9.2"
|
||||
authors = ["Federico Giraud <giraud.federico@gmail.com>"]
|
||||
build = "build.rs"
|
||||
links = "rdkafka"
|
||||
|
@ -16,6 +16,7 @@ num_enum = "0.5.0"
|
|||
libc = "0.2.65"
|
||||
openssl-sys = { version = "0.9.48", optional = true }
|
||||
libz-sys = { version = "1.0.0", optional = true }
|
||||
curl-sys = { version = "0.4.55", optional = true }
|
||||
zstd-sys = { version = "2.0.0", optional = true }
|
||||
lz4-sys = { version = "1.8.3", optional = true }
|
||||
sasl2-sys = { version = "0.1.6", optional = true }
|
||||
|
@ -69,6 +70,13 @@ libz = ["libz-sys"]
|
|||
# the system's version.
|
||||
libz-static = ["libz", "libz-sys/static"]
|
||||
|
||||
# Enable support for HTTP client via curl.
|
||||
curl = ["curl-sys"]
|
||||
|
||||
# Link against the version of curl bundled with the curl-sys crate, rather than
|
||||
# the system's version.
|
||||
curl-static = ["curl", "curl-sys/static-curl"]
|
||||
|
||||
# Enable support for zstd compression.
|
||||
zstd = ["zstd-sys"]
|
||||
|
||||
|
|
|
@ -64,6 +64,10 @@ flags you would pass to `configure` if you were compiling manually).
|
|||
feature is enabled by default. By default, the system's libz is
|
||||
dynamically linked, but static linking of the version bundled with the
|
||||
[libz-sys] crate can be requested with the `libz-static` feature.
|
||||
* The **`curl`** feature enables the HTTP client via curl. By default, the
|
||||
system's curl is dynamically linked, but static linking of the version
|
||||
bundled with the [curl-sys] create can be requested with the
|
||||
`curl-static` feature.
|
||||
* The **`zstd`** feature enables support for ZSTD compression. By default,
|
||||
this builds and statically links the version bundled with the [zstd-sys]
|
||||
crate, but dynamic linking of the system's version can be requested with
|
||||
|
@ -81,6 +85,7 @@ process is defined in [`build.rs`].
|
|||
[Apache Kafka]: https://kafka.apache.org
|
||||
[CMake]: https://cmake.org
|
||||
[libz-sys]: https://crates.io/crates/libz-sys
|
||||
[curl-sys]: https://crates.io/crates/curl-sys
|
||||
[lz4-sys]: https://crates.io/crates/lz4-sys
|
||||
[mklove]: https://github.com/edenhill/mklove
|
||||
[openssl-sys]: https://crates.io/crates/openssl-sys
|
||||
|
|
|
@ -125,6 +125,16 @@ fn build_librdkafka() {
|
|||
configure_flags.push("--disable-zlib".into());
|
||||
}
|
||||
|
||||
if env::var("CARGO_FEATURE_CURL").is_ok() {
|
||||
// There is no --enable-curl option, but it is enabled by default.
|
||||
if let Ok(curl_root) = env::var("DEP_CURL_ROOT") {
|
||||
cflags.push("-DCURLSTATIC_LIB".to_string());
|
||||
cflags.push(format!("-I{}/include", curl_root));
|
||||
}
|
||||
} else {
|
||||
configure_flags.push("--disable-curl".into());
|
||||
}
|
||||
|
||||
if env::var("CARGO_FEATURE_ZSTD").is_ok() {
|
||||
configure_flags.push("--enable-zstd".into());
|
||||
if let Ok(zstd_root) = env::var("DEP_ZSTD_ROOT") {
|
||||
|
@ -186,6 +196,7 @@ fn build_librdkafka() {
|
|||
#[cfg(feature = "cmake-build")]
|
||||
fn build_librdkafka() {
|
||||
let mut config = cmake::Config::new("librdkafka");
|
||||
let mut cmake_library_paths = vec![];
|
||||
|
||||
config
|
||||
.define("RDKAFKA_BUILD_STATIC", "1")
|
||||
|
@ -201,12 +212,28 @@ fn build_librdkafka() {
|
|||
config.define("WITH_ZLIB", "1");
|
||||
config.register_dep("z");
|
||||
if let Ok(z_root) = env::var("DEP_Z_ROOT") {
|
||||
env::set_var("CMAKE_LIBRARY_PATH", format!("{}/build", z_root));
|
||||
cmake_library_paths.push(format!("{}/build", z_root));
|
||||
}
|
||||
} else {
|
||||
config.define("WITH_ZLIB", "0");
|
||||
}
|
||||
|
||||
if env::var("CARGO_FEATURE_CURL").is_ok() {
|
||||
config.define("WITH_CURL", "1");
|
||||
config.register_dep("curl");
|
||||
if let Ok(curl_root) = env::var("DEP_CURL_ROOT") {
|
||||
config.define("CURL_STATICLIB", "1");
|
||||
cmake_library_paths.push(format!("{}/lib", curl_root));
|
||||
|
||||
config.cflag("-DCURL_STATICLIB");
|
||||
config.cxxflag("-DCURL_STATICLIB");
|
||||
config.cflag(format!("-I{}/include", curl_root));
|
||||
config.cxxflag(format!("-I{}/include", curl_root));
|
||||
}
|
||||
} else {
|
||||
config.define("WITH_CURL", "0");
|
||||
}
|
||||
|
||||
if env::var("CARGO_FEATURE_SSL").is_ok() {
|
||||
config.define("WITH_SSL", "1");
|
||||
config.define("WITH_SASL_SCRAM", "1");
|
||||
|
@ -245,6 +272,10 @@ fn build_librdkafka() {
|
|||
config.define("CMAKE_SYSTEM_NAME", system_name);
|
||||
}
|
||||
|
||||
if !cmake_library_paths.is_empty() {
|
||||
env::set_var("CMAKE_LIBRARY_PATH", cmake_library_paths.join(";"));
|
||||
}
|
||||
|
||||
println!("Configuring and compiling librdkafka");
|
||||
let dst = config.build();
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
## v4.3.0+1.9.2 (2022-06-27)
|
||||
|
||||
* Upgrade to librdkafka v1.9.2.
|
||||
|
||||
## v4.2.0+1.8.2 (2021-11-27)
|
||||
|
||||
* Upgrade to librdkafka v1.8.2.
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 30633e59a9072b7b9c76411c281578e0125d5f65
|
||||
Subproject commit 9b72ca3aa6c49f8f57eea02f70aadb1453d3ba1f
|
|
@ -1,4 +1,4 @@
|
|||
/* automatically generated by rust-bindgen 0.56.0 */
|
||||
/* automatically generated by rust-bindgen 0.60.1 */
|
||||
|
||||
use libc::{c_char, c_int, c_void, size_t, sockaddr, ssize_t, FILE};
|
||||
use num_enum::TryFromPrimitive;
|
||||
|
@ -46,8 +46,8 @@ impl<T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
|
|||
}
|
||||
}
|
||||
impl<T> ::std::cmp::Eq for __BindgenUnionField<T> {}
|
||||
pub const RD_KAFKA_VERSION: u32 = 17302271;
|
||||
pub const RD_KAFKA_DEBUG_CONTEXTS : & 'static [u8 ; 138usize] = b"all,generic,broker,topic,metadata,feature,queue,msg,protocol,cgrp,security,fetch,interceptor,plugin,consumer,admin,eos,mock,assignor,conf\0" ;
|
||||
pub const RD_KAFKA_VERSION: u32 = 17367295;
|
||||
pub const RD_KAFKA_DEBUG_CONTEXTS : & [u8 ; 138usize] = b"all,generic,broker,topic,metadata,feature,queue,msg,protocol,cgrp,security,fetch,interceptor,plugin,consumer,admin,eos,mock,assignor,conf\0" ;
|
||||
pub const RD_KAFKA_DESTROY_F_NO_CONSUMER_CLOSE: u32 = 8;
|
||||
pub const RD_KAFKA_OFFSET_BEGINNING: i32 = -2;
|
||||
pub const RD_KAFKA_OFFSET_END: i32 = -1;
|
||||
|
@ -78,6 +78,10 @@ pub const RD_KAFKA_EVENT_DELETERECORDS_RESULT: u32 = 105;
|
|||
pub const RD_KAFKA_EVENT_DELETEGROUPS_RESULT: u32 = 106;
|
||||
pub const RD_KAFKA_EVENT_DELETECONSUMERGROUPOFFSETS_RESULT: u32 = 107;
|
||||
pub const RD_KAFKA_EVENT_OAUTHBEARER_TOKEN_REFRESH: u32 = 256;
|
||||
pub const RD_KAFKA_EVENT_BACKGROUND: u32 = 512;
|
||||
pub const RD_KAFKA_EVENT_CREATEACLS_RESULT: u32 = 1024;
|
||||
pub const RD_KAFKA_EVENT_DESCRIBEACLS_RESULT: u32 = 2048;
|
||||
pub const RD_KAFKA_EVENT_DELETEACLS_RESULT: u32 = 4096;
|
||||
extern "C" {
|
||||
pub fn rd_kafka_version() -> c_int;
|
||||
}
|
||||
|
@ -166,6 +170,12 @@ pub struct rd_kafka_group_result_s {
|
|||
_unused: [u8; 0],
|
||||
}
|
||||
pub type rd_kafka_group_result_t = rd_kafka_group_result_s;
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct rd_kafka_acl_result_s {
|
||||
_unused: [u8; 0],
|
||||
}
|
||||
pub type rd_kafka_acl_result_t = rd_kafka_acl_result_s;
|
||||
#[repr(i32)]
|
||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, TryFromPrimitive)]
|
||||
pub enum rd_kafka_resp_err_t {
|
||||
|
@ -823,6 +833,9 @@ extern "C" {
|
|||
>,
|
||||
);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_conf_enable_sasl_queue(conf: *mut rd_kafka_conf_t, enable: c_int);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_conf_set_socket_cb(
|
||||
conf: *mut rd_kafka_conf_t,
|
||||
|
@ -1194,6 +1207,12 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn rd_kafka_queue_get_main(rk: *mut rd_kafka_t) -> *mut rd_kafka_queue_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_queue_get_sasl(rk: *mut rd_kafka_t) -> *mut rd_kafka_queue_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_sasl_background_callbacks_enable(rk: *mut rd_kafka_t) -> *mut rd_kafka_error_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_queue_get_consumer(rk: *mut rd_kafka_t) -> *mut rd_kafka_queue_t;
|
||||
}
|
||||
|
@ -1355,6 +1374,15 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn rd_kafka_consumer_close(rk: *mut rd_kafka_t) -> rd_kafka_resp_err_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_consumer_close_queue(
|
||||
rk: *mut rd_kafka_t,
|
||||
rkqu: *mut rd_kafka_queue_t,
|
||||
) -> *mut rd_kafka_error_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_consumer_closed(rk: *mut rd_kafka_t) -> c_int;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_incremental_assign(
|
||||
rk: *mut rd_kafka_t,
|
||||
|
@ -1501,6 +1529,7 @@ extern "C" {
|
|||
pub fn rd_kafka_purge(rk: *mut rd_kafka_t, purge_flags: c_int) -> rd_kafka_resp_err_t;
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct rd_kafka_metadata_broker {
|
||||
pub id: i32,
|
||||
pub host: *mut c_char,
|
||||
|
@ -1508,6 +1537,7 @@ pub struct rd_kafka_metadata_broker {
|
|||
}
|
||||
pub type rd_kafka_metadata_broker_t = rd_kafka_metadata_broker;
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct rd_kafka_metadata_partition {
|
||||
pub id: i32,
|
||||
pub err: rd_kafka_resp_err_t,
|
||||
|
@ -1528,6 +1558,7 @@ pub struct rd_kafka_metadata_topic {
|
|||
}
|
||||
pub type rd_kafka_metadata_topic_t = rd_kafka_metadata_topic;
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct rd_kafka_metadata {
|
||||
pub broker_cnt: c_int,
|
||||
pub brokers: *mut rd_kafka_metadata_broker,
|
||||
|
@ -1561,6 +1592,7 @@ pub struct rd_kafka_group_member_info {
|
|||
pub member_assignment_size: c_int,
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct rd_kafka_group_info {
|
||||
pub broker: rd_kafka_metadata_broker,
|
||||
pub group: *mut c_char,
|
||||
|
@ -1716,6 +1748,9 @@ extern "C" {
|
|||
}
|
||||
pub type rd_kafka_CreateTopics_result_t = rd_kafka_event_t;
|
||||
pub type rd_kafka_DeleteTopics_result_t = rd_kafka_event_t;
|
||||
pub type rd_kafka_CreateAcls_result_t = rd_kafka_event_t;
|
||||
pub type rd_kafka_DescribeAcls_result_t = rd_kafka_event_t;
|
||||
pub type rd_kafka_DeleteAcls_result_t = rd_kafka_event_t;
|
||||
pub type rd_kafka_CreatePartitions_result_t = rd_kafka_event_t;
|
||||
pub type rd_kafka_AlterConfigs_result_t = rd_kafka_event_t;
|
||||
pub type rd_kafka_DescribeConfigs_result_t = rd_kafka_event_t;
|
||||
|
@ -1762,6 +1797,21 @@ extern "C" {
|
|||
rkev: *mut rd_kafka_event_t,
|
||||
) -> *const rd_kafka_DeleteConsumerGroupOffsets_result_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_event_CreateAcls_result(
|
||||
rkev: *mut rd_kafka_event_t,
|
||||
) -> *const rd_kafka_CreateAcls_result_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_event_DescribeAcls_result(
|
||||
rkev: *mut rd_kafka_event_t,
|
||||
) -> *const rd_kafka_DescribeAcls_result_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_event_DeleteAcls_result(
|
||||
rkev: *mut rd_kafka_event_t,
|
||||
) -> *const rd_kafka_DeleteAcls_result_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_queue_poll(
|
||||
rkqu: *mut rd_kafka_queue_t,
|
||||
|
@ -2027,7 +2077,10 @@ pub enum rd_kafka_admin_op_t {
|
|||
RD_KAFKA_ADMIN_OP_DELETERECORDS = 6,
|
||||
RD_KAFKA_ADMIN_OP_DELETEGROUPS = 7,
|
||||
RD_KAFKA_ADMIN_OP_DELETECONSUMERGROUPOFFSETS = 8,
|
||||
RD_KAFKA_ADMIN_OP__CNT = 9,
|
||||
RD_KAFKA_ADMIN_OP_CREATEACLS = 9,
|
||||
RD_KAFKA_ADMIN_OP_DESCRIBEACLS = 10,
|
||||
RD_KAFKA_ADMIN_OP_DELETEACLS = 11,
|
||||
RD_KAFKA_ADMIN_OP__CNT = 12,
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
|
@ -2278,6 +2331,21 @@ pub enum rd_kafka_ResourceType_t {
|
|||
RD_KAFKA_RESOURCE_BROKER = 4,
|
||||
RD_KAFKA_RESOURCE__CNT = 5,
|
||||
}
|
||||
#[repr(u32)]
|
||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
||||
pub enum rd_kafka_ResourcePatternType_t {
|
||||
RD_KAFKA_RESOURCE_PATTERN_UNKNOWN = 0,
|
||||
RD_KAFKA_RESOURCE_PATTERN_ANY = 1,
|
||||
RD_KAFKA_RESOURCE_PATTERN_MATCH = 2,
|
||||
RD_KAFKA_RESOURCE_PATTERN_LITERAL = 3,
|
||||
RD_KAFKA_RESOURCE_PATTERN_PREFIXED = 4,
|
||||
RD_KAFKA_RESOURCE_PATTERN_TYPE__CNT = 5,
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_ResourcePatternType_name(
|
||||
resource_pattern_type: rd_kafka_ResourcePatternType_t,
|
||||
) -> *const c_char;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_ResourceType_name(restype: rd_kafka_ResourceType_t) -> *const c_char;
|
||||
}
|
||||
|
@ -2468,6 +2536,181 @@ extern "C" {
|
|||
cntp: *mut size_t,
|
||||
) -> *mut *const rd_kafka_group_result_t;
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct rd_kafka_AclBinding_s {
|
||||
_unused: [u8; 0],
|
||||
}
|
||||
pub type rd_kafka_AclBinding_t = rd_kafka_AclBinding_s;
|
||||
pub type rd_kafka_AclBindingFilter_t = rd_kafka_AclBinding_t;
|
||||
extern "C" {
|
||||
pub fn rd_kafka_acl_result_error(
|
||||
aclres: *const rd_kafka_acl_result_t,
|
||||
) -> *const rd_kafka_error_t;
|
||||
}
|
||||
#[repr(u32)]
|
||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
||||
pub enum rd_kafka_AclOperation_t {
|
||||
RD_KAFKA_ACL_OPERATION_UNKNOWN = 0,
|
||||
RD_KAFKA_ACL_OPERATION_ANY = 1,
|
||||
RD_KAFKA_ACL_OPERATION_ALL = 2,
|
||||
RD_KAFKA_ACL_OPERATION_READ = 3,
|
||||
RD_KAFKA_ACL_OPERATION_WRITE = 4,
|
||||
RD_KAFKA_ACL_OPERATION_CREATE = 5,
|
||||
RD_KAFKA_ACL_OPERATION_DELETE = 6,
|
||||
RD_KAFKA_ACL_OPERATION_ALTER = 7,
|
||||
RD_KAFKA_ACL_OPERATION_DESCRIBE = 8,
|
||||
RD_KAFKA_ACL_OPERATION_CLUSTER_ACTION = 9,
|
||||
RD_KAFKA_ACL_OPERATION_DESCRIBE_CONFIGS = 10,
|
||||
RD_KAFKA_ACL_OPERATION_ALTER_CONFIGS = 11,
|
||||
RD_KAFKA_ACL_OPERATION_IDEMPOTENT_WRITE = 12,
|
||||
RD_KAFKA_ACL_OPERATION__CNT = 13,
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_AclOperation_name(acl_operation: rd_kafka_AclOperation_t) -> *const c_char;
|
||||
}
|
||||
#[repr(u32)]
|
||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
||||
pub enum rd_kafka_AclPermissionType_t {
|
||||
RD_KAFKA_ACL_PERMISSION_TYPE_UNKNOWN = 0,
|
||||
RD_KAFKA_ACL_PERMISSION_TYPE_ANY = 1,
|
||||
RD_KAFKA_ACL_PERMISSION_TYPE_DENY = 2,
|
||||
RD_KAFKA_ACL_PERMISSION_TYPE_ALLOW = 3,
|
||||
RD_KAFKA_ACL_PERMISSION_TYPE__CNT = 4,
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_AclPermissionType_name(
|
||||
acl_permission_type: rd_kafka_AclPermissionType_t,
|
||||
) -> *const c_char;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_AclBinding_new(
|
||||
restype: rd_kafka_ResourceType_t,
|
||||
name: *const c_char,
|
||||
resource_pattern_type: rd_kafka_ResourcePatternType_t,
|
||||
principal: *const c_char,
|
||||
host: *const c_char,
|
||||
operation: rd_kafka_AclOperation_t,
|
||||
permission_type: rd_kafka_AclPermissionType_t,
|
||||
errstr: *mut c_char,
|
||||
errstr_size: size_t,
|
||||
) -> *mut rd_kafka_AclBinding_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_AclBindingFilter_new(
|
||||
restype: rd_kafka_ResourceType_t,
|
||||
name: *const c_char,
|
||||
resource_pattern_type: rd_kafka_ResourcePatternType_t,
|
||||
principal: *const c_char,
|
||||
host: *const c_char,
|
||||
operation: rd_kafka_AclOperation_t,
|
||||
permission_type: rd_kafka_AclPermissionType_t,
|
||||
errstr: *mut c_char,
|
||||
errstr_size: size_t,
|
||||
) -> *mut rd_kafka_AclBindingFilter_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_AclBinding_restype(
|
||||
acl: *const rd_kafka_AclBinding_t,
|
||||
) -> rd_kafka_ResourceType_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_AclBinding_name(acl: *const rd_kafka_AclBinding_t) -> *const c_char;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_AclBinding_principal(acl: *const rd_kafka_AclBinding_t) -> *const c_char;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_AclBinding_host(acl: *const rd_kafka_AclBinding_t) -> *const c_char;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_AclBinding_operation(
|
||||
acl: *const rd_kafka_AclBinding_t,
|
||||
) -> rd_kafka_AclOperation_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_AclBinding_permission_type(
|
||||
acl: *const rd_kafka_AclBinding_t,
|
||||
) -> rd_kafka_AclPermissionType_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_AclBinding_resource_pattern_type(
|
||||
acl: *const rd_kafka_AclBinding_t,
|
||||
) -> rd_kafka_ResourcePatternType_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_AclBinding_error(acl: *const rd_kafka_AclBinding_t) -> *const rd_kafka_error_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_AclBinding_destroy(acl_binding: *mut rd_kafka_AclBinding_t);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_AclBinding_destroy_array(
|
||||
acl_bindings: *mut *mut rd_kafka_AclBinding_t,
|
||||
acl_bindings_cnt: size_t,
|
||||
);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_CreateAcls_result_acls(
|
||||
result: *const rd_kafka_CreateAcls_result_t,
|
||||
cntp: *mut size_t,
|
||||
) -> *mut *const rd_kafka_acl_result_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_CreateAcls(
|
||||
rk: *mut rd_kafka_t,
|
||||
new_acls: *mut *mut rd_kafka_AclBinding_t,
|
||||
new_acls_cnt: size_t,
|
||||
options: *const rd_kafka_AdminOptions_t,
|
||||
rkqu: *mut rd_kafka_queue_t,
|
||||
);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_DescribeAcls_result_acls(
|
||||
result: *const rd_kafka_DescribeAcls_result_t,
|
||||
cntp: *mut size_t,
|
||||
) -> *mut *const rd_kafka_AclBinding_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_DescribeAcls(
|
||||
rk: *mut rd_kafka_t,
|
||||
acl_filter: *mut rd_kafka_AclBindingFilter_t,
|
||||
options: *const rd_kafka_AdminOptions_t,
|
||||
rkqu: *mut rd_kafka_queue_t,
|
||||
);
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct rd_kafka_DeleteAcls_result_response_s {
|
||||
_unused: [u8; 0],
|
||||
}
|
||||
pub type rd_kafka_DeleteAcls_result_response_t = rd_kafka_DeleteAcls_result_response_s;
|
||||
extern "C" {
|
||||
pub fn rd_kafka_DeleteAcls_result_responses(
|
||||
result: *const rd_kafka_DeleteAcls_result_t,
|
||||
cntp: *mut size_t,
|
||||
) -> *mut *const rd_kafka_DeleteAcls_result_response_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_DeleteAcls_result_response_error(
|
||||
result_response: *const rd_kafka_DeleteAcls_result_response_t,
|
||||
) -> *const rd_kafka_error_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_DeleteAcls_result_response_matching_acls(
|
||||
result_response: *const rd_kafka_DeleteAcls_result_response_t,
|
||||
matching_acls_cntp: *mut size_t,
|
||||
) -> *mut *const rd_kafka_AclBinding_t;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_DeleteAcls(
|
||||
rk: *mut rd_kafka_t,
|
||||
del_acls: *mut *mut rd_kafka_AclBindingFilter_t,
|
||||
del_acls_cnt: size_t,
|
||||
options: *const rd_kafka_AdminOptions_t,
|
||||
rkqu: *mut rd_kafka_queue_t,
|
||||
);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn rd_kafka_oauthbearer_set_token(
|
||||
rk: *mut rd_kafka_t,
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
//! dependency is present. The current design of Cargo unfortunately makes
|
||||
//! this nearly impossible to fix.
|
||||
//!
|
||||
//! * Windows is only supported when using the CMake build system via the
|
||||
//! `cmake-build` Cargo feature.
|
||||
//!
|
||||
//! ### Features
|
||||
//!
|
||||
//! By default a submodule with the librdkafka sources will be used to compile
|
||||
|
@ -59,6 +62,10 @@
|
|||
//! feature is enabled by default. By default, the system's libz is
|
||||
//! dynamically linked, but static linking of the version bundled with the
|
||||
//! [libz-sys] crate can be requested with the `libz-static` feature.
|
||||
//! * The **`curl`** feature enables the HTTP client via curl. By default, the
|
||||
//! system's curl is dynamically linked, but static linking of the version
|
||||
//! bundled with the [curl-sys] create can be requested with the
|
||||
//! `curl-static` feature.
|
||||
//! * The **`zstd`** feature enables support for ZSTD compression. By default,
|
||||
//! this builds and statically links the version bundled with the [zstd-sys]
|
||||
//! crate, but dynamic linking of the system's version can be requested with
|
||||
|
@ -76,6 +83,7 @@
|
|||
//! [Apache Kafka]: https://kafka.apache.org
|
||||
//! [CMake]: https://cmake.org
|
||||
//! [libz-sys]: https://crates.io/crates/libz-sys
|
||||
//! [curl-sys]: https://crates.io/crates/curl-sys
|
||||
//! [lz4-sys]: https://crates.io/crates/lz4-sys
|
||||
//! [mklove]: https://github.com/edenhill/mklove
|
||||
//! [openssl-sys]: https://crates.io/crates/openssl-sys
|
||||
|
@ -92,6 +100,9 @@ extern crate sasl2_sys;
|
|||
#[cfg(feature = "libz-sys")]
|
||||
extern crate libz_sys;
|
||||
|
||||
#[cfg(feature = "curl-sys")]
|
||||
extern crate curl_sys;
|
||||
|
||||
#[cfg(feature = "zstd-sys")]
|
||||
extern crate zstd_sys;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//! ## The library
|
||||
//!
|
||||
//! `rust-rdkafka` provides a safe Rust interface to librdkafka. The master
|
||||
//! branch is currently based on librdkafka 1.8.2.
|
||||
//! branch is currently based on librdkafka 1.9.0.
|
||||
//!
|
||||
//! ### Documentation
|
||||
//!
|
||||
|
|
Loading…
Reference in New Issue