class Consul::KV

Defined in:

consul/client/kv.cr

Instance Method Summary

Instance methods inherited from class Consul::Transport

client : HTTP::Client client, consistency : String consistency, delete(path : String) : HTTP::Client::Response delete, get(path : String) : HTTP::Client::Response get, get_consistency : String get_consistency, put(path : String, data : JSON::Any) : HTTP::Client::Response
put(path : String, data : String) : HTTP::Client::Response
put(path : String) : HTTP::Client::Response
put

Constructor methods inherited from class Consul::Transport

new(client : HTTP::Client, consistency : String = "default") new

Instance Method Detail

def create_key(path : String, content : String) #

create_key creates or updates an key. The return value is either true or false, indicating whether the create/update succeeded


[View source]
def delete_key(path : String) #

delete_key deletes a single key or all keys sharing a prefix


[View source]
def get_key(path : String, recurse : Bool, keys : Bool) : Array(String) #

overload get key - get all keys without value


[View source]
def get_key(path : String, recurse : Bool) : Array(Consul::Types::KV::KvPair) #

overload get_key, recurse option


[View source]
def get_key(path : String) : Consul::Types::KV::KvPair #

get_key returns the specified key. If no key exists at the given path, a 404 is returned instead of a 200 response


[View source]