View Source Please.Requests.Request (Please v0.1.0)

A struct to represent a single request from some node.

The id field is a UUID acting as an unique identifier for the request. The node field is the atom node name of the node that sent the request and hosts the PID of the process that the request response will be sent to.

Summary

Functions

Create a new request struct. The from field will be the atom node name of the current node, and the id field will be a new UUID.

Types

@type t() :: %Please.Requests.Request{
  args: list(),
  function: atom(),
  id: String.t(),
  module: atom(),
  node: atom(),
  pid: pid()
}

Functions

Link to this function

new(pid, module, function, args \\ [])

View Source

Create a new request struct. The from field will be the atom node name of the current node, and the id field will be a new UUID.

Examples

iex> Please.Request.new(Node, :self)
%Please.Request{id: <some uuid>, from: :nonode@nohost, to: nil, module: Node, function: :self, args: []}