ConsulKv (consul_kv v0.1.0)

Elixir SDK for Consul KV store.

Link to this section Summary

Functions

Delete kv pair by given key use Check-And-Set operation.

Put kv pair use Check-And-Set operation.

Delete kv pair by given key.

Get kv pair by given key.

Delete kv pair by given key recursively.

Get kv pair by given key recursively.

Get kv pair by given key.

Link to this section Types

Specs

flags() :: non_neg_integer()

Specs

index() :: non_neg_integer()

Specs

key() :: String.t()

Specs

options() :: keyword()

Specs

path() :: String.t()

Specs

session() :: String.t()

Specs

t() :: %ConsulKv{
  create_index: index(),
  flags: flags(),
  key: key(),
  lock_index: index(),
  modify_index: index(),
  session: session(),
  value: value()
}

Specs

value() :: any()

Link to this section Functions

Link to this function

cas_delete(consul_kv, options \\ [])

Specs

cas_delete(t(), Keyword.t()) :: {:ok, true} | {:error, any()}

Delete kv pair by given key use Check-And-Set operation.

Link to this function

cas_put(consul_kv, new_value, options \\ [])

Specs

cas_put(t(), any(), Keyword.t()) :: {:ok, true} | {:error, any()}

Put kv pair use Check-And-Set operation.

Link to this function

delete(key, options \\ [])

Specs

delete(String.t(), Keyword.t()) :: {:ok, true} | {:error, any()}

Delete kv pair by given key.

Link to this function

get(key, options \\ [])

Specs

get(String.t(), Keyword.t()) :: {:ok, [t()]} | {:error, any()}

Get kv pair by given key.

Link to this function

put(key, value, options \\ [])

Specs

put(String.t(), any(), Keyword.t()) :: {:ok, true} | {:error, any()}

Put kv pair.

Link to this function

recurse_delete(key, options \\ [])

Delete kv pair by given key recursively.

Link to this function

recurse_get(key, options \\ [])

Specs

recurse_get(String.t(), Keyword.t()) :: {:ok, [t()]} | {:error, any()}

Get kv pair by given key recursively.

Link to this function

single_get(key, options \\ [])

Specs

single_get(String.t(), Keyword.t()) :: {:ok, t()} | {:error, any()}

Get kv pair by given key.