Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add admin API client #122

Merged
merged 3 commits into from
Aug 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ serde_derive = "1.0.0"
serde_json = "1.0.0"

[dev-dependencies]
backoff = "0.1.5"
chrono = "0.4.0"
clap = "2.18.0"
env_logger = "0.3.0"
rand = "0.3.15"
regex = "1.1.6"
tokio = "0.1.7"

[features]
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ services:
volumes:
- .:/mount
command: ./run_tests.sh
environment:
- KAFKA_VERSION=2.2.0

kafka:
image: confluentinc/cp-kafka:5.2.1
Expand Down
3 changes: 3 additions & 0 deletions rdkafka-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ fn main() {
.rustified_enum("rd_kafka_conf_res_t")
.rustified_enum("rd_kafka_resp_err_t")
.rustified_enum("rd_kafka_timestamp_type_t")
.rustified_enum("rd_kafka_admin_op_t")
.rustified_enum("rd_kafka_ResourceType_t")
.rustified_enum("rd_kafka_ConfigSource_t")
.generate()
.expect("failed to generate bindings");

Expand Down
33 changes: 33 additions & 0 deletions rdkafka-sys/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,30 @@ pub type RDKafkaGroupMemberInfo = bindings::rd_kafka_group_member_info;
/// Native rdkafka group member information
pub type RDKafkaHeaders = bindings::rd_kafka_headers_t;

/// Native rdkafka queue
pub type RDKafkaQueue = bindings::rd_kafka_queue_t;

// Native rdkafka new topic object
pub type RDKafkaNewTopic = bindings::rd_kafka_NewTopic_t;

// Native rdkafka delete topic object
pub type RDKafkaDeleteTopic = bindings::rd_kafka_DeleteTopic_t;

// Native rdkafka new partitions object
pub type RDKafkaNewPartitions = bindings::rd_kafka_NewPartitions_t;

// Native rdkafka config resource
pub type RDKafkaConfigResource = bindings::rd_kafka_ConfigResource_t;

// Native rdkafka event
pub type RDKafkaEvent = bindings::rd_kafka_event_t;

// Native rdkafka admin options
pub type RDKafkaAdminOptions = bindings::rd_kafka_AdminOptions_t;

// Native rdkafka topic result
pub type RDKafkaTopicResult = bindings::rd_kafka_topic_result_t;

// ENUMS

/// Client types
Expand All @@ -66,6 +90,15 @@ pub use bindings::rd_kafka_conf_res_t as RDKafkaConfRes;
/// Response error
pub use bindings::rd_kafka_resp_err_t as RDKafkaRespErr;

/// Admin operation
pub use bindings::rd_kafka_admin_op_t as RDKafkaAdminOp;

/// Config resource type
pub use bindings::rd_kafka_ResourceType_t as RDKafkaResourceType;

/// Config source
pub use bindings::rd_kafka_ConfigSource_t as RDKafkaConfigSource;

/// Errors enum

/// Error from the underlying rdkafka library.
Expand Down
Loading