View Source Zenohex.Publisher (Zenohex v0.2.0)

Documentation for Elixir.Zenohex.Publisher.

Summary

Functions

Change the congestion_control to apply when routing the data.

Delete data.

Change the priority of the written data.

Types

Functions

Link to this function

congestion_control(publisher, congestion_control)

View Source
@spec congestion_control(t(), Zenohex.Publisher.Options.congestion_control()) :: t()

Change the congestion_control to apply when routing the data.

Examples

iex> {:ok, session} = Zenohex.open()
iex> {:ok, publisher} = Zenohex.Session.declare_publisher(session, "key/expression")
iex> Zenohex.Publisher.congestion_control(publisher, :drop)
@spec delete(t()) :: :ok | {:error, reason :: any()}

Delete data.

Examples

iex> {:ok, session} = Zenohex.open()
iex> {:ok, publisher} = Zenohex.Session.declare_publisher(session, "key/expression")
iex> :ok = Zenohex.Publisher.delete(publisher)
Link to this function

priority(publisher, priority)

View Source
@spec priority(t(), Zenohex.Publisher.Options.priority()) :: t()

Change the priority of the written data.

Examples

iex> {:ok, session} = Zenohex.open()
iex> {:ok, publisher} = Zenohex.Session.declare_publisher(session, "key/expression")
iex> Zenohex.Publisher.priority(publisher, :real_time)
@spec put(t(), binary() | integer() | float()) :: :ok | {:error, reason :: any()}

Put data.

Examples

iex> {:ok, session} = Zenohex.open()
iex> {:ok, publisher} = Zenohex.Session.declare_publisher(session, "key/expression")
iex> :ok = Zenohex.Publisher.put(publisher, "value")
iex> :ok = Zenohex.Publisher.put(publisher, 0)
iex> :ok = Zenohex.Publisher.put(publisher, 0.0)