vintage_net v0.2.1 VintageNet.Persistence behaviour

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 Functions

Link to this function

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

Link to this section Callbacks

Link to this callback

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

Clear out a previously saved configuration

Link to this callback

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

Enumerate the interfaces that have saved configurations

This returns a list of interface names.

Link to this callback

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

Load the configuration of an interface

Link to this callback

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

Save the configuration for the specified interface