Update dependencies, enhance NATS consumer configuration, and improve error handling in message processing. Introduce telemetry support with OpenTelemetry for tracing and metrics. Refactor README to include new configuration options and update tests for improved coverage of error scenarios.

This commit is contained in:
windyboy
2025-11-15 09:01:24 +08:00
parent 31839cf21f
commit 359e7694ab
31 changed files with 1326 additions and 667 deletions
+1 -2
View File
@@ -14,8 +14,7 @@ func NewAviationParser() *AviationParser {
}
// Parse parses a raw message string and returns a ParsedMessage
func (p *AviationParser) Parse(rawText string) *domain.ParsedMessage {
func (p *AviationParser) Parse(rawText string) (*domain.ParsedMessage, error) {
// Use the existing Parse function from internal/parsers
return parsers.Parse(rawText)
}
+1 -3
View File
@@ -5,7 +5,5 @@ import "caatsm/internal/domain"
// Parser defines the interface for parsing raw telegram messages
type Parser interface {
// Parse parses a raw message string and returns a ParsedMessage
Parse(rawText string) *domain.ParsedMessage
// TODO: consider returning (*domain.ParsedMessage, error) to surface parse failures explicitly.
Parse(rawText string) (*domain.ParsedMessage, error)
}