Class: Rafflesia::DependencyStatus

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/system/dependency_status.rb

Constant Summary collapse

HASH_ATTRS =
{
  checked_at: :checked_at,
  elapsed_ms: :elapsed_ms,
  endpoint: :endpoint,
  is_configured: :is_configured,
  kind: :kind,
  message: :message,
  name: :name,
  probe_attempts: :probe_attempts,
  recovery_hint: :recovery_hint,
  status: :status,
  successful_probe_attempts: :successful_probe_attempts
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DependencyStatus

Returns a new instance of DependencyStatus.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/rafflesia/system/dependency_status.rb', line 35

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @checked_at = hash[:checked_at]
  @elapsed_ms = hash[:elapsed_ms]
  @endpoint = hash[:endpoint]
  @is_configured = hash[:is_configured]
  @kind = hash[:kind]
  @message = hash[:message]
  @name = hash[:name]
  @probe_attempts = hash[:probe_attempts]
  @recovery_hint = hash[:recovery_hint]
  @status = hash[:status]
  @successful_probe_attempts = hash[:successful_probe_attempts]
end

Instance Attribute Details

#checked_atObject

Returns the value of attribute checked_at.



22
23
24
# File 'lib/rafflesia/system/dependency_status.rb', line 22

def checked_at
  @checked_at
end

#elapsed_msObject

Returns the value of attribute elapsed_ms.



22
23
24
# File 'lib/rafflesia/system/dependency_status.rb', line 22

def elapsed_ms
  @elapsed_ms
end

#endpointObject

Returns the value of attribute endpoint.



22
23
24
# File 'lib/rafflesia/system/dependency_status.rb', line 22

def endpoint
  @endpoint
end

#is_configuredObject

Returns the value of attribute is_configured.



22
23
24
# File 'lib/rafflesia/system/dependency_status.rb', line 22

def is_configured
  @is_configured
end

#kindObject

Returns the value of attribute kind.



22
23
24
# File 'lib/rafflesia/system/dependency_status.rb', line 22

def kind
  @kind
end

#messageObject

Returns the value of attribute message.



22
23
24
# File 'lib/rafflesia/system/dependency_status.rb', line 22

def message
  @message
end

#nameObject

Returns the value of attribute name.



22
23
24
# File 'lib/rafflesia/system/dependency_status.rb', line 22

def name
  @name
end

#probe_attemptsObject

Returns the value of attribute probe_attempts.



22
23
24
# File 'lib/rafflesia/system/dependency_status.rb', line 22

def probe_attempts
  @probe_attempts
end

#recovery_hintObject

Returns the value of attribute recovery_hint.



22
23
24
# File 'lib/rafflesia/system/dependency_status.rb', line 22

def recovery_hint
  @recovery_hint
end

#statusObject

Returns the value of attribute status.



22
23
24
# File 'lib/rafflesia/system/dependency_status.rb', line 22

def status
  @status
end

#successful_probe_attemptsObject

Returns the value of attribute successful_probe_attempts.



22
23
24
# File 'lib/rafflesia/system/dependency_status.rb', line 22

def successful_probe_attempts
  @successful_probe_attempts
end