Example GenServer implementation of Publisher
using Zenohex.Session.declare_publisher/3.
This example demonstrates how to publish.
For the actual implementation, please refer to the following,
Examples
iex> Zenohex.Examples.Publisher.start_link([])
Summary
Functions
Sends a Zenohex.Sample with kind: :delete.
Sends a Zenohex.Sample with kind: :put and the given payload.
Starts Elixir.Zenohex.Examples.Publisher.
Stops Elixir.Zenohex.Examples.Publisher
Functions
@spec delete(GenServer.server()) :: :ok | {:error, reason :: term()}
Sends a Zenohex.Sample with kind: :delete.
@spec put(GenServer.server(), binary()) :: :ok | {:error, reason :: term()}
Sends a Zenohex.Sample with kind: :put and the given payload.
@spec start_link( session_id: Zenohex.Session.id(), key_expr: String.t(), name: GenServer.name() ) :: GenServer.on_start()
Starts Elixir.Zenohex.Examples.Publisher.
Parameters
args– a keyword list that can include the following keys::session_id– the ID of the session:key_expr– the key expression to publish to
@spec stop(GenServer.server()) :: :ok | {:error, reason :: term()}
Stops Elixir.Zenohex.Examples.Publisher