Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandContainerSpec ¶
func ExpandContainerSpec(t *api.Task) (*api.ContainerSpec, error)
ExpandContainerSpec expands templated fields in the runtime using the task state. Templating is all evaluated on the agent-side, before execution.
Note that these are projected only on runtime values, since active task values are typically manipulated in the manager.
Types ¶
type Context ¶
type Context struct { Service struct { ID string Name string Labels map[string]string } Node struct { ID string } Task struct { ID string Name string Slot string } }
Context defines the strict set of values that can be injected into a template expression in SwarmKit data structure.
func NewContextFromTask ¶
NewContextFromTask returns a new template context from the data available in task. The provided context can then be used to populate runtime values in a ContainerSpec.
Click to show internal directories.
Click to hide internal directories.