Skip to content

Commit f967933

Browse files
committed
feat: Add better docs for the new config foramt
1 parent a0d0987 commit f967933

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

relay-config/src/config.rs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,8 +938,27 @@ pub enum KafkaConfig<'a> {
938938
Single(KafkaParams<'a>),
939939

940940
/// The list of the Kafka configs with related shard configs.
941+
/// The configuration for this should look like:
942+
/// ```
943+
/// metrics:
944+
/// shards: 65000
945+
/// mapping:
946+
/// 0:
947+
/// name: "ingest-metrics-1"
948+
/// config: "metric_1"
949+
/// 25000:
950+
/// name: "ingest-metrics-2"
951+
/// config: "metrics_2"
952+
/// 45000:
953+
/// name: "ingest-metrics-3"
954+
/// config: "metrics_3"
955+
/// ```
956+
///
957+
/// where the `shards` defines how many logical shards must be created, and `mapping`
958+
/// describes the per-shard configuration. Index in the `mapping` is the initial inclusive
959+
/// index of the shard. And it always must start with 0.
941960
Sharded {
942-
/// the maximum number of logical shards for this set of configs.
961+
/// The maximum number of logical shards for this set of configs.
943962
shards: u64,
944963
/// The list of the sharded Kafka configs.
945964
configs: BTreeMap<u64, KafkaParams<'a>>,

0 commit comments

Comments
 (0)