debian-mirror-gitlab/lib/gitlab/health_checks/result.rb
2021-12-11 22:18:48 +05:30

18 lines
370 B
Ruby

# 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