Open birdayz opened 6 years ago
Hi @birdayz. Thank you for writing kaf!
Would you be open to a PR that adds an --output=json
flag (or whatever name) that returns JSON output?
Example:
$> kaf topic describe test
Name: test
Internal: false
Compacted: false
Partitions:
Partition High Watermark Leader Replicas ISR
--------- -------------- ------ -------- ---
0 11 1 [1] [1]
Summed HighWatermark: 11
Config:
Name Value ReadOnly Sensitive
---- ----- -------- ---------
retention.ms 10000000 false false
max.message.bytes 100000000 false false
$> kaf --output=json topic describe test
{
"name": "test",
"internal": false,
"compacted": false,
"partitions": [
{
"partition": 0,
"highwatermark": 11,
"leader": 1,
"replicas": [1],
"isr": [1]
}
],
"summed_high_watermark": 11,
"config": [
{
"name": "retention.ms",
"value": "10000000",
"readonly": false,
"sensitive": false
},
{
"name": "max.message.bytes",
"value": "100000000",
"readonly": false,
"sensitive": false
}
]
}
Support automated use of this tool.