View Source Sleipnir.Client protocol (sleipnir v0.1.3)

The HTTP client that makes requests on behalf of Sleipnir

Link to this section Summary

Types

Returned if the request was successfully sent. Loki will generally respond with status 204 No Content on a successful request. Headers should contain the headers from the response.

t()

Functions

Pushes the request to Loki. Implementations may define their own options.

Link to this section Types

@type reason() :: term()
@type response() :: %{status: integer(), headers: [{binary(), binary()}]}

Returned if the request was successfully sent. Loki will generally respond with status 204 No Content on a successful request. Headers should contain the headers from the response.

@type result() :: {:ok, response()} | {:error, reason()}
@type t() :: term()

Link to this section Functions

Link to this function

push(client, push_request, opts \\ [])

View Source
@spec push(t(), Sleipnir.PushRequest.t(), Keyword.t()) :: result()

Pushes the request to Loki. Implementations may define their own options.