Expand description
Schema loading and Rust codegen for the Datadog agent config schema.
Parses core_schema.yaml (with any overlay applied upstream) into a flat map of
yaml_path → FieldInfo, then emits schema.rs containing one SchemaEntry constant
per config key. Used exclusively at build time.
The schema may contain $ref: <filename> entries that reference subsystem schema files in
the same directory. These are resolved and inlined during loading.
Structs§
- Field
Info - Parsed metadata for a single config field.
Enums§
- Field
Type - Value type of a config field, as declared in the schema YAML.
Functions§
- escape_
str - Escape backslashes and double-quotes in
sfor use inside a Rust string literal. - field_
type_ as_ rust - Return the
ValueType::*token string for use in generated Rust source. - generate_
schema_ rs - Generate
schema.rsindirfromschema_map. - is_
unknown - Return
trueifftisFieldType::Unknown. - load_
schema - Load and flatten the schema at
schema_pathinto ayaml_path → FieldInfomap. - yaml_
path_ to_ const - Convert a dotted YAML path (for example,
"dogstatsd.bind_host") to aSCREAMING_SNAKE_CASERust identifier suitable for aconstname.