FleetApi behaviour
This module contains callback declarations for interacting with a Fleet API endpoint.
Callbacks
Specs:
- delete_unit(pid, unit_name :: String.t) :: :ok | {:error, any}
Remove a unit from the Fleet cluster.
Specs:
- get_unit(pid, unit_name :: String.t) :: {:ok, FleetApi.Unit.t} | {:error, any}
Retrieve the details for a specific unit in the Fleet cluster.
Specs:
- list_machines(pid) :: {:ok, [FleetApi.Machine.t]} | {:error, any}
Retrieve the list of nodes currently in the Fleet cluster.
Specs:
- list_unit_states(pid, opts :: [{atom, String.t}]) :: {:ok, [FleetApi.UnitState.t]} | {:error, any}
Get the detailed state information for all the units in the Fleet cluster.
You may optionally provide options machineID
and/or unitName
to filter
the response to a particular host or unit.
Specs:
- list_units(pid) :: {:ok, [FleetApi.Unit.t]} | {:error, any}
Retrieve the list of units that the Fleet cluster currently knows about.
Specs:
- set_unit(pid, unit_name :: String.t, FleetApi.Unit.t) :: :ok | {:error, any}
Adds or updates a unit in the Fleet cluster. If the cluster doesn’t contain a unit with the given name, then a new unit is added to it. If a unit with the given name exists, it is updated with the new unit definition.