Etcd::Keys
Keys module provides the basic key value operations against etcd /keys namespace
Instance methods
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