Gust.Flows (gust v0.1.19)
The Flows context.
This module serves as the boundary for accessing and manipulating Flow-related data, such as DAGs, Runs, Tasks, and Secrets.
Summary
Functions
Returns an %Ecto.Changeset{} for tracking secret changes.
Creates a DAG.
Creates a log.
Creates a run.
Creates a secret.
Creates a task.
Creates a test run.
Creates a test task.
Deletes a DAG.
Deletes all DAGs whose IDs are not in the provided list.
Deletes a secret.
Gets a single DAG.
Gets a DAG by name.
Gets a DAG with its runs preloaded.
Gets a DAG with its runs and tasks preloaded, with pagination for runs.
Gets a single log.
Gets a single run.
Gets a single run with its tasks preloaded.
Gets runs for a list of DAG IDs with the given status.
Gets a single secret.
Gets a single secret by name.
Gets a single task.
Gets a task by name and run ID.
Gets a task by name and run ID, with logs preloaded.
Gets a task with its logs preloaded.
Lists all DAGs.
Lists all secrets.
Toggles the enabled status of a DAG.
Updates a run status.
Updates a secret.
Updates a task attempt count.
Updates a task error.
Updates a task result.
Updates a task result and error.
Updates a task status.
Functions
Returns an %Ecto.Changeset{} for tracking secret changes.
Examples
iex> change_secret(secret)
%Ecto.Changeset{data: %Secret{}}
Creates a DAG.
Examples
iex> create_dag(%{field: value})
{:ok, %Dag{}}
iex> create_dag(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Creates a log.
Creates a run.
Examples
iex> create_run(%{field: value})
{:ok, %Run{}}
iex> create_run(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Creates a secret.
Examples
iex> create_secret(%{field: value})
{:ok, %Secret{}}
iex> create_secret(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Creates a task.
Creates a test run.
Creates a test task.
Deletes a DAG.
Deletes all DAGs whose IDs are not in the provided list.
Deletes a secret.
Gets a single DAG.
Raises Ecto.NoResultsError if the Dag does not exist.
Gets a DAG by name.
Gets a DAG with its runs preloaded.
Gets a DAG with its runs and tasks preloaded, with pagination for runs.
Gets a single log.
Raises Ecto.NoResultsError if the Log does not exist.
Gets a single run.
Raises Ecto.NoResultsError if the Run does not exist.
Examples
iex> get_run!(123)
%Run{}
iex> get_run!(456)
** (Ecto.NoResultsError)
Gets a single run with its tasks preloaded.
Gets runs for a list of DAG IDs with the given status.
Parameters
dag_ids: List of DAG IDs to filter runs by.status: The status to filter runs by (e.g., "running").
Examples
iex> get_running_runs_by_dag([1, 2, 3], "running")
[%Run{}, ...]
Gets a single secret.
Raises Ecto.NoResultsError if the Secret does not exist.
Gets a single secret by name.
Gets a single task.
Raises Ecto.NoResultsError if the Task does not exist.
Gets a task by name and run ID.
Gets a task by name and run ID, with logs preloaded.
Gets a task with its logs preloaded.
Lists all DAGs.
Lists all secrets.
Toggles the enabled status of a DAG.
Updates a run status.
Updates a secret.
Updates a task attempt count.
Updates a task error.
Updates a task result.
Updates a task result and error.
Updates a task status.