Astarte.RPC.Client behaviour (astarte_rpc v1.0.5) 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

Specs

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

Specs

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

Specs

rpc_cast(serialized_request :: binary(), destination :: term()) :: :ok