Managoat.Runner.Names (managoat_runner v0.1.0)

Copy Markdown View Source

Sandbox names on the runner provider carry the runner id, because Managoat.Sandbox hands an adapter nothing but the name: the shape is runner-<32 hex>-<8 hex>, the runner's UUID without dashes and a random suffix.

Pure functions. Which runner a new sandbox should be minted on is the host's placement policy and is not here.

Summary

Functions

Mint a sandbox name on the runner: runner-<32 hex>-<8 hex>.

Recover the runner id (as a lowercase dashed UUID) from a sandbox name.

Functions

for_runner(runner_id)

@spec for_runner(binary()) :: String.t()

Mint a sandbox name on the runner: runner-<32 hex>-<8 hex>.

parse(arg1)

@spec parse(String.t()) :: {:ok, binary()} | :error

Recover the runner id (as a lowercase dashed UUID) from a sandbox name.