get_kv: Obtain Key / Value from Consul

Description Usage Arguments Value Examples

Description

See https://www.consul.io/ for more about Consul.

Usage

1
2
3
get_kv(key)

get_batch_kv(path, ...)

Arguments

key

Key name to retrieve

path

Path name to retrieve

...

One or many keys under path to retrieve. All but path name will be coersed into a list.

Value

Decoded value retrieved from Consul. 'NA' if empty.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 

# Return a string
get_kv("fruit/apple")

# Return a list of values
get_batch_kv("fruit", c("apple", "banana", "coconut"))
# This works too
get_batch_kv("fruit", "apple", "banana", "coconut")


## End(Not run)

tmasjc/rConsulKV documentation built on May 15, 2019, 12:47 p.m.