amlel-el-mahrouss commented on code in PR #2988:
URL: https://github.com/apache/iggy/pull/2988#discussion_r2969536167
##########
foreign/cpp/src/lib.rs:
##########
@@ -81,6 +97,49 @@ mod ffi {
message_expiry_value: u64,
max_topic_size: String,
) -> Result<()>;
+ // fn purge_topic(&self, stream_id: Identifier, topic_id: Identifier)
-> Result<()>;
+ fn create_partitions(
+ &self,
+ stream_id: Identifier,
+ topic_id: Identifier,
+ partitions_count: u32,
+ ) -> Result<()>;
+ fn delete_partitions(
+ &self,
+ stream_id: Identifier,
+ topic_id: Identifier,
+ partitions_count: u32,
+ ) -> Result<()>;
+ fn create_consumer_group(
+ &self,
+ stream_id: Identifier,
+ topic_id: Identifier,
+ name: String,
+ ) -> Result<ConsumerGroupDetails>;
+ fn get_consumer_group(
+ &self,
+ stream_id: Identifier,
+ topic_id: Identifier,
+ group_id: Identifier,
+ ) -> Result<ConsumerGroupDetails>;
+ fn join_consumer_group(
+ &self,
+ stream_id: Identifier,
+ topic_id: Identifier,
+ group_id: Identifier,
+ ) -> Result<()>;
+ fn leave_consumer_group(
+ &self,
+ stream_id: Identifier,
+ topic_id: Identifier,
+ group_id: Identifier,
+ ) -> Result<()>;
+ fn delete_consumer_group(
+ &self,
+ stream_id: Identifier,
+ topic_id: Identifier,
+ group_id: Identifier,
+ ) -> Result<()>;
Review Comment:
This could be wrapped in a `impl Group` right?
##########
foreign/cpp/src/client.rs:
##########
@@ -53,22 +53,22 @@ pub fn new_connection(connection_string: String) ->
Result<*mut Client, String>
}
impl Client {
- pub fn connect(&self) -> Result<(), String> {
+ pub fn login_user(&self, username: String, password: String) -> Result<(),
String> {
Review Comment:
why do you take `self` but pass `username` and `password` after
independently?
##########
foreign/cpp/src/topic.rs:
##########
@@ -25,9 +25,9 @@ impl From<RustTopic> for ffi::Topic {
created_at: topic.created_at.as_micros(),
name: topic.name,
size_bytes: topic.size.as_bytes_u64(),
- message_expiry: topic.message_expiry.into(),
+ message_expiry: u64::from(topic.message_expiry),
Review Comment:
What if it's ill formed data?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]