Singyeong.Client (singyeong v0.4.14) View Source
Link to this section Summary
Functions
Send a message with the given payload to all clients matching the given routing query.
Send a message with the given payload to all clients matching the given routing query, sending the given nonce to allow request-response messaging.
Returns a specification to start this module under a supervisor.
Proxies the given HTTP request with the given body to a target matching the given routing query, using the HTTP method provided.
ACK a message from the given queue, letting the server know that it doesn't need to be requeued.
Push the specified message to the specified queue, with a routing query to determine what client can pull it from the queue.
Push the specified message to the specified queue, with a routing query to determine what client can pull it from the queue, sending the given nonce to allow request-response messaging.
Mark this client as being ready to process a message from the given queue.
Send a message with the given payload to a single client matching the given routing query.
Send a message with the given payload to a single client matching the given routing query, sending the given nonce to allow request-response messaging.
Update the client's metadata. A metadata update has a few parts
Link to this section Types
Specs
http_method() :: :get | :post | :put | :patch | :delete
Link to this section Functions
Specs
broadcast_msg(Singyeong.Query.t(), term()) :: :ok
Send a message with the given payload to all clients matching the given routing query.
Specs
broadcast_msg(String.t() | nil, Singyeong.Query.t(), term()) :: :ok
Send a message with the given payload to all clients matching the given routing query, sending the given nonce to allow request-response messaging.
Returns a specification to start this module under a supervisor.
See Supervisor
.
Specs
proxy(Singyeong.Query.t(), String.t(), http_method(), term()) :: term()
Proxies the given HTTP request with the given body to a target matching the given routing query, using the HTTP method provided.
Specs
ACK a message from the given queue, letting the server know that it doesn't need to be requeued.
Specs
queue_msg(String.t(), Singyeong.Query.t(), term()) :: :ok
Push the specified message to the specified queue, with a routing query to determine what client can pull it from the queue.
Specs
queue_msg(String.t(), String.t() | nil, Singyeong.Query.t(), term()) :: :ok
Push the specified message to the specified queue, with a routing query to determine what client can pull it from the queue, sending the given nonce to allow request-response messaging.
Specs
queue_request(String.t()) :: :ok
Mark this client as being ready to process a message from the given queue.
Specs
send_msg(Singyeong.Query.t(), term()) :: :ok
Send a message with the given payload to a single client matching the given routing query.
Specs
send_msg(String.t() | nil, Singyeong.Query.t(), term()) :: :ok
Send a message with the given payload to a single client matching the given routing query, sending the given nonce to allow request-response messaging.
Specs
update_metadata(Singyeong.Metadata.t()) :: :ok
Update the client's metadata. A metadata update has a few parts:
- key
- type
- value
Possible types are:
- string
- integer
- float
- version
- list
A metadata update looks like:
%{
key: %{
type: "string",
value: "potato",
},
users: %{
type: "list",
value: [123, 456, 789],
}
version: %{
type: "version",
value: "2.0.0",
}
}