module Etcd::Keys
Overview
Keys module provides the basic key value operations against etcd /keys namespace
Direct including types
Defined in:
etcd/keys.crInstance Method Summary
-
#compare_and_swap(key : String, opts : Options = Options.new) : Response
Set a new value for key if previous value of key is matched
- #create(key : String, opts : Options)
- #create(key : String)
- #create_in_order(dir : String, opts : Options = Options.new) : Response
-
#delete(key : String, opts : Options = Options.new) : Response
Deletes a key (and its content)
- #exists?(key)
-
#get(key : String, opts : Options = Options.new) : Response
Retrives a key with its associated data, if key is not present it will return with message "Key Not Found"
-
#key_endpoint
return etcd endpoint that is reserved for key/value store
-
#set(key : String, opts : Options = Options.new) : Response
Create or update a new key
- #update(key : String, opts : Options)
- #update(key : String)
-
#watch(key : String, opts : Options = Options.new, timeout : Int32 = -1) : Response
Gives a notification when specified key changes
Instance Method Detail
Set a new value for key if previous value of key is matched
This method takes the following parameters as arguments
- key - whose value is going to change if previous value is matched
- value - new value to be set for specified key
- prevValue - value of a key to compare with existing value of key
- ttl - shelf life of a key (in secsonds) (optional)
Deletes a key (and its content)
This method takes the following parameters as arguments
- key - key to be deleted
Retrives a key with its associated data, if key is not present it will return with message "Key Not Found"
This method takes the following parameters as arguments
- key - whose data is to be retrieved
Create or update a new key
This method takes the following parameters as arguments
- key - whose value to be set
- value - value to be set for specified key
- ttl - shelf life of a key (in seconds) (optional)
Gives a notification when specified key changes
This method takes the following parameters as arguments @ key - key to be watched @options [Hash] additional options for watching a key @options [Fixnum] :index watch the specified key from given index @options [Fixnum] :timeout specify http timeout