Skip to content

Commit

Permalink
document the status and description attributes of a message
Browse files Browse the repository at this point in the history
  • Loading branch information
mmmries committed Apr 25, 2024
1 parent 8ee338c commit e790ea4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/gnat.ex
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,18 @@ defmodule Gnat do
* `sid` - The subscription ID corresponding to this message. You generally won't need to use this value directly.
* `reply_to` - A topic supplied for expected replies
* `headers` - A set of NATS message headers on the message
* `status` - Similar to an HTTP status, this is present for messages with headers and can indicate the specific purpose of a message. Example `status: "408"`
* `description` - A string description of the `status`
"""
@type message :: %{
required(:gnat) => t(),
required(:topic) => binary(),
required(:body) => iodata(),
required(:sid) => non_neg_integer(),
optional(:reply_to) => binary(),
optional(:headers) => headers()
optional(:headers) => headers(),
optional(:status) => String.t(),
optional(:description) => String.t()
}
@type sent_message :: {:msg, message()}

Expand Down

0 comments on commit e790ea4

Please sign in to comment.