25 lines
853 B
Go
25 lines
853 B
Go
// Package processors defines feedkit's generic processor abstraction and registry.
|
|
//
|
|
// Processors are optional pipeline stages that can transform, drop, or reject
|
|
// events before dispatch to sinks.
|
|
//
|
|
// Registry provides name-based construction so daemons can assemble processor
|
|
// chains without embedding switch statements in wiring code.
|
|
//
|
|
// Example:
|
|
//
|
|
// reg := processors.NewRegistry()
|
|
// reg.Register("dedupe", dedupe.Factory(10_000))
|
|
// reg.Register("normalize", func() (processors.Processor, error) {
|
|
// // import "gitea.maximumdirect.net/ejr/feedkit/processors/normalize"
|
|
// return normalize.NewProcessor(myNormalizers, false), nil
|
|
// })
|
|
//
|
|
// chain, err := reg.BuildChain([]string{"dedupe", "normalize"})
|
|
// if err != nil {
|
|
// // handle wiring error
|
|
// }
|
|
//
|
|
// p := &pipeline.Pipeline{Processors: chain}
|
|
package processors
|