Example GenServer implementation of Scout
using Zenohex.Scouting.declare_scout/3.
This example demonstrates how to scout.
For the actual implementation, please refer to the following,
Examples
iex> Zenohex.Examples.Scout.start_link([])
Summary
Functions
Stops Elixir.Zenohex.Examples.Scout
Functions
@spec start_link( what: Zenohex.Scouting.what(), config: Zenohex.Config.t(), name: GenServer.name(), callback: (Zenohex.Scouting.Hello.t() -> term()) ) :: GenServer.on_start()
Starts Elixir.Zenohex.Examples.Scout.
Parameters
args– a keyword list that can include the following keys::what– the target to scout (e.g.,:peeror:router):config– the configuration used for scouting:callback– a function to be called when a hello message is received
@spec stop(GenServer.server()) :: :ok | {:error, reason :: term()}
Stops Elixir.Zenohex.Examples.Scout