Normandy.Agents.ConfigTemplate (normandy v1.0.0)

View Source

Splits a %BaseAgentConfig{} into a serializable, secret-free template (persisted via SessionStore.save_config_template/3) and reconstructs a full config on any node from template + node-local supplement + credential token.

Excluded from the template (resolved node-locally instead): client (built from the token), tool_registry (from the supplement), and before/after_hooks (from the supplement). Behaviour module refs travel in the template; their opts must be serializable.

Summary

Functions

from_config(c, template_id)

@spec from_config(Normandy.Agents.BaseAgentConfig.t(), String.t()) :: map()

from_config(c, template_id, resume_policy)

@spec from_config(Normandy.Agents.BaseAgentConfig.t(), String.t(), :lazy | :eager) ::
  map()

rebuild(tmpl, supplement, token)