Class: Gitlab::HealthChecks::Probes::Status

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#http_statusObject

Returns the value of attribute http_status

Returns:

  • (Object)

    the current value of http_status



7
8
9
# File 'lib/gitlab/health_checks/probes/status.rb', line 7

def http_status
  @http_status
end

#jsonObject

Returns the value of attribute json

Returns:

  • (Object)

    the current value of json



7
8
9
# File 'lib/gitlab/health_checks/probes/status.rb', line 7

def json
  @json
end

Instance Method Details

#success?Boolean

We accept 2xx

Returns:

  • (Boolean)


9
10
11
# File 'lib/gitlab/health_checks/probes/status.rb', line 9

def success?
  http_status / 100 == 2
end