FleetApi behaviour

This module contains callback declarations for interacting with a Fleet API endpoint.

Source

Callbacks

delete_unit/2

Specs:

  • delete_unit(pid, unit_name :: String.t) :: :ok | {:error, any}

Remove a unit from the Fleet cluster.

Source
get_api_discovery/1

Specs:

  • get_api_discovery(pid) :: {:ok, Map.t} | {:error, any}

Retrieve the API Discovery document JSON for the Fleet API.

Source
get_unit/2

Specs:

Retrieve the details for a specific unit in the Fleet cluster.

Source
list_machines/1

Specs:

Retrieve the list of nodes currently in the Fleet cluster.

Source
list_unit_states/2

Specs:

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.

Source
list_units/1

Specs:

Retrieve the list of units that the Fleet cluster currently knows about.

Source
set_unit/3

Specs:

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.

Source