Welcome to mirror list, hosted at ThFree Co, Russian Federation.

result.rb « health_checks « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cbb847d2af295f637e84ccdb06773b06287c16c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# rubocop:disable Naming/FileName
# frozen_string_literal: true

module Gitlab
  module HealthChecks
    Result = Struct.new(:name, :success, :message, :labels) do
      def payload
        {
          status: success ? 'ok' : 'failed',
          message: message,
          labels: labels
        }.compact
      end
    end
  end
end

# rubocop:enable Naming/FileName