class Consul::Async::VaultResult
Keep information about Vault result of a query
Attributes
data[R]
http[R]
retry_in[R]
stats[R]
Public Class Methods
new(result, modified, stats, retry_in)
click to toggle source
# File lib/consul/async/vault_endpoint.rb, line 80 def initialize(result, modified, stats, retry_in) @data = result.response @modified = modified @http = result @data_json = result.json @last_update = Time.now.utc @next_update = Time.now.utc + retry_in @stats = stats @retry_in = retry_in end
Public Instance Methods
[](path)
click to toggle source
# File lib/consul/async/vault_endpoint.rb, line 100 def [](path) json[path] end
json()
click to toggle source
# File lib/consul/async/vault_endpoint.rb, line 104 def json @data_json = JSON.parse(data) if @data_json.nil? @data_json end
modified?()
click to toggle source
# File lib/consul/async/vault_endpoint.rb, line 91 def modified? @modified end
mutate(new_data)
click to toggle source
# File lib/consul/async/vault_endpoint.rb, line 95 def mutate(new_data) @data = new_data.dup @data_json = nil end