astarte_rpc v0.11.3 Astarte.RPC.Client behaviour View Source

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).

Link to this section Summary

Link to this section Callbacks

Link to this callback

rpc_call(serialized_request, destination)

View Source
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
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
rpc_cast(serialized_request :: binary(), destination :: term()) :: :ok