Packages

An Elixir client for Consul's HTTP API

Current section

Files

Jump to
exconsul lib consul response.ex
Raw

lib/consul/response.ex

#
# The MIT License (MIT)
#
# Copyright (c) 2014-2015 Undead Labs, LLC
#
defmodule Consul.Response do
@type t :: HTTPoison.Response.t
@spec consul_index(t) :: integer | nil
def consul_index(%{headers: %{"X-Consul-Index" => index}}), do: index
def consul_index(_), do: nil
end