Skip to main content

pick_leader

Function pick_leader 

Source
pub(crate) fn pick_leader<'a>(
    defs: &'a [AgentDefinition],
    name: &str,
) -> Result<&'a AgentDefinition, String>
Expand description

The agent name means: its id, else its slug or its name (not minding case). More than one by name is refused, since a worker must not start under the wrong leader.