tryAllocDaemon

suspend fun tryAllocDaemon(runner: Runner): DockerDaemon?

Attempts to allocate a daemon to the runner, and returns the DockerDaemon if one is allocated.

Return

The DockerDaemon instance bound to the runner, or null if no daemons can be allocated to the runner.

Parameters

runner

to obtain a daemon for.

Throws

if the runner is not bound to this dispatcher.

if a runner's resource reservation cannot be satisfied by any online daemons.

if the daemon bound to the runner is disconnected.


private suspend fun tryAllocDaemon(runner: Runner, triggeredByWrite: Boolean): DockerDaemon?

Attempts to allocate a daemon to the runner, and returns the DockerDaemon if one is allocated.

Return

The DockerDaemon instance bound to the runner, or null if no daemons can be allocated to the runner.

Parameters

runner

to obtain a daemon for.

triggeredByWrite

Whether this method is triggered by a "write" operation, such as adding a new runner to the dispatcher.

Throws

if the runner is not bound to this dispatcher.

if a runner's resource reservation cannot be satisfied by any online daemons.

if the daemon bound to the runner is disconnected.