Behaviour for WebRTC Connection modules.
This allows for mocking in tests.
Summary
Callbacks
Calls a tool over the WebRTC data channel.
Calls a tool stream over the WebRTC data channel.
Closes the WebRTC connection.
Gets the connection state.
Gets the ICE connection state.
Starts a new WebRTC connection.
Callbacks
@callback call_tool( pid :: pid(), tool_name :: String.t(), args :: map(), timeout :: integer() ) :: {:ok, map()} | {:error, term()}
Calls a tool over the WebRTC data channel.
@callback call_tool_stream( pid :: pid(), tool_name :: String.t(), args :: map(), timeout :: integer() ) :: {:ok, Enumerable.t()} | {:error, term()}
Calls a tool stream over the WebRTC data channel.
@callback close(pid :: pid()) :: :ok
Closes the WebRTC connection.
Gets the connection state.
Gets the ICE connection state.
@callback start_link( provider :: map(), signaling_server :: String.t(), ice_servers :: [map()] ) :: {:ok, pid()} | {:error, term()}
Starts a new WebRTC connection.