Documentation
¶
Overview ¶
Package config parses and validates a declarative cascade configuration: a versioned YAML document that declares the input, the ordered stages and their gates, and where classified records are routed. It rejects a malformed pipeline up front, before any input is opened; building a runnable cascade from a Config belongs to the composition root (the CLI), not here.
Index ¶
- Constants
- func LoadMock(path string) (*mockstage.Stage, error)
- func LoadRules(path string) (*rules.Stage, error)
- func LoadSchema(path string) (*schema.Stage, error)
- func ParseMock(data []byte) (*mockstage.Stage, error)
- func ParseRules(data []byte) (*rules.Stage, error)
- func ParseSchema(data []byte) (*schema.Stage, error)
- type Config
- type Input
- type SinkSpec
- type StageSpec
Constants ¶
View Source
const Version = 1
Version is the only config schema version this build understands.
Variables ¶
This section is empty.
Functions ¶
func LoadSchema ¶
LoadSchema builds a schema stage from a YAML file.
func ParseRules ¶
ParseRules builds a rules stage from a YAML document.
Types ¶
type Config ¶
type Config struct {
Version int `yaml:"version"`
Input Input `yaml:"input"`
Stages []StageSpec `yaml:"stages"`
Workers int `yaml:"workers,omitempty"` // concurrent classification workers; 0/1 = serial
Routes map[string]SinkSpec `yaml:"routes,omitempty"`
Sink SinkSpec `yaml:"sink"`
Review *SinkSpec `yaml:"review,omitempty"`
}
Config is a declared cascade.
type Input ¶
type Input struct {
Type string `yaml:"type"` // text | jsonl
}
Input names where records come from.
Click to show internal directories.
Click to hide internal directories.