Files
feedkit/sinks/builtins.go
Eric Rakestraw eb9a7cb349 Refactor feedkit boundaries ahead of v1
Remove global Postgres schema registration in favor of explicit schema-aware sink factory wiring, and update weatherfeeder to register the Postgres sink explicitly. Add optional per-source HTTP timeout and response body limit overrides while keeping feedkit defaults. Remove remaining legacy source/config compatibility surfaces, including singular kind support and old source registry/type aliases, and migrate weatherfeeder sources to plural `Kinds()` metadata. Clean up related docs, tests, and sample config to match the new Postgres, HTTP, and NATS configuration model.
2026-03-28 13:52:48 -05:00

20 lines
689 B
Go

package sinks
import "gitea.maximumdirect.net/ejr/feedkit/config"
// RegisterBuiltins registers sink drivers included in this binary.
//
// In feedkit, these are "infrastructure primitives" — they are not domain-specific.
// Individual daemons can choose to call this (or register their own custom sinks).
func RegisterBuiltins(r *Registry) {
// Stdout sink: great for debugging, piping to jq, etc.
r.Register("stdout", func(cfg config.SinkConfig) (Sink, error) {
return NewStdoutSink(cfg.Name), nil
})
// NATS sink: publishes events to a broker for downstream consumers.
r.Register("nats", func(cfg config.SinkConfig) (Sink, error) {
return NewNATSSinkFromConfig(cfg)
})
}