From 29cbacf0f6150a22fd49fc77afc1b63513a74c75 Mon Sep 17 00:00:00 2001 From: niebayes Date: Fri, 15 Dec 2023 17:28:58 +0800 Subject: [PATCH] chore: add some comments to kafka --- src/common/meta/src/wal/kafka.rs | 6 +++++- src/common/meta/src/wal/kafka/topic.rs | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common/meta/src/wal/kafka.rs b/src/common/meta/src/wal/kafka.rs index 0ec523cfc346..c835512051f2 100644 --- a/src/common/meta/src/wal/kafka.rs +++ b/src/common/meta/src/wal/kafka.rs @@ -20,10 +20,14 @@ use serde::{Deserialize, Serialize}; use crate::wal::kafka::topic::Topic; +/// Configurations for bootstraping a kafka wal. #[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)] pub struct KafkaConfig; +/// Kafka wal options allocated to a region. #[derive(Serialize, Deserialize, Default, Debug, Clone, PartialEq)] pub struct KafkaWalOptions { - topic: Topic, + /// Kafka wal topic. + /// Publishers publish log entries to the topic while subscribers pull log entries from the topic. + pub topic: Topic, } diff --git a/src/common/meta/src/wal/kafka/topic.rs b/src/common/meta/src/wal/kafka/topic.rs index 1f2c1a466b41..755e7e2ba5a3 100644 --- a/src/common/meta/src/wal/kafka/topic.rs +++ b/src/common/meta/src/wal/kafka/topic.rs @@ -12,4 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. +/// Kafka wal topic. +// A topic is simply a string right now. But it may be more complex in the future. pub type Topic = String;