-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow reading messages with no encoding (#32)
- Loading branch information
Showing
9 changed files
with
129 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ kplay | |
records | ||
cosign.key | ||
cosign.pub | ||
screenshots | ||
demo.gif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
### Added | ||
|
||
- Allow dynamic parsing of protobuf encoded messages | ||
|
||
### Changed | ||
|
||
- Message metadata and value are now shown in a single viewport | ||
- The command line interface; most of the configuration is now taken from the | ||
config file | ||
|
||
### Removed | ||
|
||
- Keymaps to maximize message metadata or value viewport | ||
|
||
## [v0.1.0] - Mar 6, 2024 | ||
|
||
### Added | ||
|
||
- A TUI that allows pulling messages from a kafka topic on demand, and viewing | ||
their metadata and value | ||
- Allow persisting messages to the local filesystem | ||
- Allow skipping messages | ||
|
||
[unreleased]: https://github.com/dhth/kplay/compare/v0.1.0...HEAD | ||
[v0.1.0]: https://github.com/dhth/kplay/commits/v0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package config | ||
|
||
import "fmt" | ||
|
||
const ( | ||
awsMSKIAM = "aws_msk_iam" | ||
) | ||
|
||
type AuthType uint | ||
|
||
const ( | ||
NoAuth AuthType = iota | ||
AWSMSKIAM | ||
) | ||
|
||
func ValidateAuthValue(value string) (AuthType, error) { | ||
switch value { | ||
case "none": | ||
return NoAuth, nil | ||
case awsMSKIAM: | ||
return AWSMSKIAM, nil | ||
default: | ||
return NoAuth, fmt.Errorf("auth value is missing/incorrect; possible values: [none, %s]", awsMSKIAM) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package config | ||
|
||
import "fmt" | ||
|
||
type EncodingFormat uint | ||
|
||
const ( | ||
JSON EncodingFormat = iota | ||
Protobuf | ||
Raw | ||
) | ||
|
||
func ValidateEncodingFmtValue(value string) (EncodingFormat, error) { | ||
switch value { | ||
case "json": | ||
return JSON, nil | ||
case "protobuf": | ||
return Protobuf, nil | ||
case "raw": | ||
return Raw, nil | ||
default: | ||
return JSON, fmt.Errorf("encoding format is missing/incorrect; possible values: [json, protobuf, raw]") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
profiles: | ||
- name: local | ||
authentication: none | ||
encodingFormat: raw | ||
brokers: | ||
- 127.0.0.1:9092 | ||
topic: kplay-test-1 | ||
consumerGroup: kplay-consumer-group-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters