tanzim-load
First stage of the tanzim pipeline: reads raw configuration bytes from a declared source.
The Load trait
Implement [Load] to add a new source kind. Return one [Payload] per config entry found.
Use Payload::name for the entry name and Payload::format as a hint for the parser stage.
Built-in loaders
| Module | Feature | Source string |
|---|---|---|
env |
env |
env |
file |
file |
file |
http |
http |
http |
closure |
— | any (user-defined) |
Example
use ;
use SourceBuilder;
Features
| Feature | Enables |
|---|---|
env |
env loader (reads environment variables) |
file |
file loader (reads from filesystem) |
http |
http loader (user-provided fetch closure) |
logging |
emit log messages via the log crate |
tracing |
emit trace spans via the tracing crate |
full |
env + file + http |
Default features: logging, env.
Relations
- Depends on
tanzim-sourceforSourceandOptions. - Produces
Payloadvalues consumed bytanzim-parse. - Full pipeline wired in
tanzim.