View Source Astarte.RPC.Client behaviour (astarte_rpc v1.2.0)

This module defines the Astarte RPC Client behaviour.

Its responsibility is delivering the serialized request to the RPC server and delivering the serialized reply to the caller (if needed).

Summary

Callbacks

Link to this callback

rpc_call(serialized_request, destination)

View Source
@callback rpc_call(serialized_request :: binary(), destination :: term()) ::
  {:ok, serialized_reply :: binary()} | {:error, reason :: term()}
Link to this callback

rpc_call(serialized_request, destination, timeout)

View Source
@callback rpc_call(
  serialized_request :: binary(),
  destination :: term(),
  timeout :: integer()
) :: {:ok, serialized_reply :: binary()} | {:error, reason :: term()}
Link to this callback

rpc_cast(serialized_request, destination)

View Source
@callback rpc_cast(serialized_request :: binary(), destination :: term()) :: :ok