summaryrefslogtreecommitdiff
path: root/lib/gitlab/health_checks/probes/status.rb
blob: 1c59f18ff7d526258fe14eea6b63707736847ddf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# rubocop:disable Naming/FileName
# frozen_string_literal: true

module Gitlab
  module HealthChecks
    module Probes
      Status = Struct.new(:http_status, :json) do
        # We accept 2xx
        def success?
          http_status / 100 == 2
        end
      end
    end
  end
end

# rubocop:enable Naming/FileName