VintageNet.Persistence behaviour (vintage_net v0.11.3) View Source

Customize the way VintageNet saves and loads configurations

Link to this section Summary

Callbacks

Clear out a previously saved configuration

Enumerate the interfaces that have saved configurations

Load the configuration of an interface

Save the configuration for the specified interface

Link to this section Callbacks

Specs

clear(ifname :: String.t()) :: :ok

Clear out a previously saved configuration

Specs

enumerate() :: [String.t()]

Enumerate the interfaces that have saved configurations

This returns a list of interface names.

Specs

load(ifname :: String.t()) :: {:ok, map()} | {:error, reason :: any()}

Load the configuration of an interface

Specs

save(ifname :: String.t(), config :: map()) :: :ok | {:error, atom()}

Save the configuration for the specified interface

Link to this section Functions

Specs

call(atom(), [any()]) :: any()