freddy v0.10.2 Freddy.RPC.Request

RPC Request data structure. Applications may modify this data structure. For example, one might want to add some specific publication option to every request, or change routing key, based on request payload, or just add some application-specific meta-information.

Link to this section Summary

Types

Request identifier. Used only internally, can be anything

Request meta information. Application can put their specific data here

Request options

Request payload

Request routing key

t()

Link to this section Types

Link to this type id()
id() :: term

Request identifier. Used only internally, can be anything

Link to this type meta()
meta() :: map

Request meta information. Application can put their specific data here

Link to this type options()
options() :: Keyword.t

Request options

Link to this type payload()
payload() :: term

Request payload

Link to this type routing_key()
routing_key() :: binary

Request routing key

Link to this type t()
t() :: %Freddy.RPC.Request{id: id, meta: map, options: options, payload: payload, routing_key: routing_key, start_time: time, stop_time: time | nil}
Link to this type time()
time() :: integer

Link to this section Functions

Link to this function duration(req, granularity \\ :milliseconds)
duration(t, granularity :: System.time_unit) :: integer
Link to this function finish(req)
finish(t) :: t
Link to this function put_meta(req, key, value)
put_meta(t, key :: term, value :: term) :: t
Link to this function put_option(req, option, value)
put_option(t, option :: atom, value :: term) :: t
Link to this function start(id, payload, routing_key, options)
start(id, payload, routing_key, options) :: t
Link to this function update_payload(req, new_payload)
update_payload(t, payload) :: t
Link to this function update_routing_key(req, new_routing_key)
update_routing_key(t, routing_key) :: t