Cleaned up documentation and removed stubs and TODOs throughout the application
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
// Package normalize provides a concrete normalization processor for feedkit pipelines.
|
||||
// Package normalize provides the feedkit normalization processor and related
|
||||
// helper APIs for raw-to-canonical event mapping.
|
||||
//
|
||||
// Motivation:
|
||||
// Many daemons have sources that:
|
||||
// 1. fetch raw upstream data (often JSON), and
|
||||
// 2. transform it into a domain's normalized payload format.
|
||||
// External API surface:
|
||||
// - Processor: concrete processors.Processor implementation
|
||||
// - Normalizer / Func: normalization interface and ergonomic function adapter
|
||||
//
|
||||
// Doing both steps inside Source.Poll works, but tends to make sources large and
|
||||
// encourages duplication (unit conversions, common mapping helpers, etc.).
|
||||
// Optional helpers from helpers.go:
|
||||
// - PayloadJSONBytes: extract supported JSON-shaped payloads into bytes
|
||||
// - DecodeJSONPayload: decode an event payload into a typed struct
|
||||
// - FinalizeEvent: copy the input event envelope onto a normalized output
|
||||
//
|
||||
// This package lets a source emit a "raw" event (e.g., Schema="raw.openweather.current.v1",
|
||||
// Payload=json.RawMessage), and then a normalize.Processor can convert it into a
|
||||
// normalized event (e.g., Schema="weather.observation.v1", Payload=WeatherObservation{}).
|
||||
// Typical usage:
|
||||
// sources emit raw events (often with json.RawMessage payloads), then a
|
||||
// normalize.Processor converts matching raw schemas into canonical payloads.
|
||||
//
|
||||
// Key property: normalization is optional.
|
||||
// If no Normalizer matches an event, Processor passes it through unchanged by default.
|
||||
|
||||
Reference in New Issue
Block a user