Current section
Files
Jump to
Current section
Files
lib/fact/influx_connection.ex
defmodule Fact.Influx do
@moduledoc false
use Instream.Connection, otp_app: :helen
def shards(db) do
Fact.Influx.execute("show shards")
|> Map.get(:results)
|> hd()
|> Map.get(:series)
|> Enum.find(fn x -> Map.get(x, :name, db) == db end)
end
end