class Dalli::Elasticache::AutoDiscovery::StatsResponse

This class wraps the raw ASCII response from a stats call to an Auto Discovery endpoint and provides methods for extracting data from that response.

docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/AutoDiscovery.AddingToYourClientLibrary.html

Constants

VERSION_REGEX

Matches the version line of the response

Attributes

text[R]

The raw response text

Public Class Methods

new(response_text) click to toggle source
# File lib/dalli/elasticache/auto_discovery/stats_response.rb, line 18
def initialize(response_text)
  @text = response_text.to_s
end

Public Instance Methods

engine_version() click to toggle source

Extract the engine version stat

Returns a string

# File lib/dalli/elasticache/auto_discovery/stats_response.rb, line 25
def engine_version
  m = VERSION_REGEX.match(@text)
  return '' unless m && m[1]

  m[1]
end