Class: Gitlab::HealthChecks::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/gitlab/health_checks/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#labelsObject

Returns the value of attribute labels

Returns:

  • (Object)

    the current value of labels


6
7
8
# File 'lib/gitlab/health_checks/result.rb', line 6

def labels
  @labels
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message


6
7
8
# File 'lib/gitlab/health_checks/result.rb', line 6

def message
  @message
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name


6
7
8
# File 'lib/gitlab/health_checks/result.rb', line 6

def name
  @name
end

#successObject

Returns the value of attribute success

Returns:

  • (Object)

    the current value of success


6
7
8
# File 'lib/gitlab/health_checks/result.rb', line 6

def success
  @success
end

Instance Method Details

#payloadObject


7
8
9
10
11
12
13
# File 'lib/gitlab/health_checks/result.rb', line 7

def payload
  {
    status: success ? 'ok' : 'failed',
    message: message,
    labels: labels
  }.compact
end