Skip to main content

Module template

Module template 

Source
Expand description

Tera template rendering for pitchfork.toml configuration fields.

Allows run, env values, hooks.*, and ready_cmd to use Tera templates like {{ daemons.redis.ports[0] }} to reference computed values from other daemons.

Templates are resolved level-by-level along the dependency order: each level can reference daemons from previous levels (which have already started and had their ports resolved).

Structs§

DaemonTemplateState
Resolved state of a daemon available for template rendering.
TemplateContext
Context for rendering Tera templates in pitchfork.toml fields.

Enums§

RenderError

Functions§

render_daemon_templates
Render all template-enabled fields of a daemon config.
render_template
Render a Tera template string with the given context.