ExDaytona.Api.Runners (ex_daytona v0.2.0)

Copy Markdown View Source

API calls for all endpoints tagged Runners.

Summary

Functions

create_runner(connection, create_runner, opts \\ [])

Create runner

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • create_runner (CreateRunner):
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.CreateRunnerResponse.t} on success
  • {:error, Tesla.Env.t} on failure

delete_runner(connection, id, opts \\ [])

@spec delete_runner(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

Delete runner

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • id (String.t): Runner ID
  • opts (keyword): Optional parameters
    • :force (boolean()): Delete the runner without waiting for sandboxes already marked for destruction. Requires the runner to have stopped reporting as ready.
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

get_info_for_authenticated_runner(connection, opts \\ [])

@spec get_info_for_authenticated_runner(
  Tesla.Env.client(),
  keyword()
) :: {:ok, ExDaytona.Model.RunnerFull.t()} | {:error, Tesla.Env.t()}

Get info for authenticated runner

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.RunnerFull.t} on success
  • {:error, Tesla.Env.t} on failure

get_runner_by_id(connection, id, opts \\ [])

@spec get_runner_by_id(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.Runner.t()} | {:error, Tesla.Env.t()}

Get runner by ID

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • id (String.t): Runner ID
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Runner.t} on success
  • {:error, Tesla.Env.t} on failure

get_runner_by_sandbox_id(connection, sandbox_id, opts \\ [])

@spec get_runner_by_sandbox_id(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.RunnerFull.t()} | {:error, Tesla.Env.t()}

Get runner by sandbox ID

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • sandbox_id (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.RunnerFull.t} on success
  • {:error, Tesla.Env.t} on failure

get_runner_full_by_id(connection, id, opts \\ [])

@spec get_runner_full_by_id(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.RunnerFull.t()} | {:error, Tesla.Env.t()}

Get runner by ID

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • id (String.t): Runner ID
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.RunnerFull.t} on success
  • {:error, Tesla.Env.t} on failure

get_runners_by_snapshot_ref(connection, ref, opts \\ [])

@spec get_runners_by_snapshot_ref(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, [ExDaytona.Model.RunnerSnapshotDto.t()]} | {:error, Tesla.Env.t()}

Get runners by snapshot ref

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • ref (String.t): Snapshot ref
  • opts (keyword): Optional parameters

Returns

  • {:ok, [%RunnerSnapshotDto{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

get_snapshot_refs_for_authenticated_runner(connection, opts \\ [])

@spec get_snapshot_refs_for_authenticated_runner(
  Tesla.Env.client(),
  keyword()
) :: {:ok, [String.t()]} | {:error, Tesla.Env.t()}

Get snapshot refs for authenticated runner

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, [%String.t{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

list_runners(connection, opts \\ [])

@spec list_runners(
  Tesla.Env.client(),
  keyword()
) :: {:ok, [ExDaytona.Model.Runner.t()]} | {:error, Tesla.Env.t()}

List all runners

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :regionId (String.t): Filter runners by region ID
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, [%Runner{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

runner_healthcheck(connection, runner_healthcheck, opts \\ [])

@spec runner_healthcheck(
  Tesla.Env.client(),
  ExDaytona.Model.RunnerHealthcheck.t(),
  keyword()
) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

Runner healthcheck Endpoint for version 2 runners to send healthcheck and metrics. Updates lastChecked timestamp and runner metrics.

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • runner_healthcheck (RunnerHealthcheck):
  • opts (keyword): Optional parameters

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

update_runner_draining(connection, id, opts \\ [])

@spec update_runner_draining(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.Runner.t()} | {:error, Tesla.Env.t()}

Update runner draining status

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • id (String.t): Runner ID
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Runner.t} on success
  • {:error, Tesla.Env.t} on failure

update_runner_scheduling(connection, id, opts \\ [])

@spec update_runner_scheduling(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.Runner.t()} | {:error, Tesla.Env.t()}

Update runner scheduling status

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • id (String.t): Runner ID
  • opts (keyword): Optional parameters
    • :"X-Daytona-Organization-ID" (String.t): Use with JWT to specify the organization ID

Returns

  • {:ok, ExDaytona.Model.Runner.t} on success
  • {:error, Tesla.Env.t} on failure