peluquero v0.6.0 Peluquero.Utils

Plain utilities for the project

Summary

Functions

consul(root, path)
consul_key_type(key)
consul_key_type(String.t) :: {:plain | :nested, :bag | :item}

Quick check for the consul key.

## Examples

iex> Peluquero.Utils.consul_key_type("a/b/c/")
  {:nested, :bag, "a"}
  iex> Peluquero.Utils.consul_key_type("a/b/c")
  {:nested, :item, "a"}
  iex> Peluquero.Utils.consul_key_type("a/")
  {:plain, :bag, "a"}
  iex> Peluquero.Utils.consul_key_type("a")
  {:plain, :item, "a"}
safe(value)