Sleipnir
A Loki client.
Installation
The package can be installed
by adding sleipnir to your list of dependencies in mix.exs:
def deps do
[
{:sleipnir, "~> 0.1.0"}
]
end
Documentation may be found at https://hexdocs.pm/sleipnir.
Usage
Currently only supports the Loki push API.
First, get a client:
client = Sleipnir.client("http://localhost:3100", org_id: "tenant1")
Then, create a PushRequest and push it:
request = "I am a log" |> Sleipnir.entry() |> Sleipnir.stream([{"service", "xyz"}]) |> Sleipnir.request()
Sleipnir.Client.push(client, request)
There are a variety of ways to create a request. Consult the docs for more info!