Consul v0.1.6 Consul.KV

Higher level abstraction on top of Consul’s Key Value api.

Summary

Types

flags()
flags :: non_neg_integer
index()
index :: non_neg_integer
key()
options()
options :: keyword
path()
t()
t :: %Consul.KV{create_index: index, flags: flags, key: key, lock_index: index, modify_index: index, value: value}
value()
value :: any

Functions

get(obj, options \\ [])
get(t, options) :: t
get(path, options) :: t

Get a new Consul.KV struct.

Takes either a Consul.KV struct with a valid key field or a string path.

options are optional. These are the same options the Consul.HTTP.Raw client will take. They are passed through.

Examples

iex> Consul.KV.get(%Consul.KV{key: "wat"})
%Consul.KV{}

iex> Consul.KV.get("wat")
%Consul.KV{}