View Source NervesHubLink.Extensions behaviour (nerves_hub_link v2.6.0)
Summary
Callbacks
Invoked when routing an Extension event
Functions
Attach specified extensions
Returns a specification to start this module under a supervisor.
Detach specified extensions
List extensions currently available
Callbacks
@callback handle_event(String.t(), map(), state :: term()) :: {:noreply, new_state} | {:noreply, new_state, timeout() | :hibernate | {:continue, continue_arg :: term()}} | {:stop, reason :: term(), new_state} when new_state: term()
Invoked when routing an Extension event
Behaves the same as GenServer.handle_info/2
Functions
Attach specified extensions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Detach specified extensions
Also supports :all
as an argument for cases NervesHubLink
may want to detach all of them at once
@spec list() :: [ %{ required(String.t()) => %{ attached?: boolean(), attach_ref: String.t(), module: module(), version: boolean() } } ]
List extensions currently available