mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-10 01:31:45 +00:00
24 lines
500 B
Ruby
24 lines
500 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Gitlab
|
|
module Prometheus
|
|
class Adapter
|
|
attr_reader :project, :cluster
|
|
|
|
def initialize(project, cluster)
|
|
@project = project
|
|
@cluster = cluster
|
|
end
|
|
|
|
def prometheus_adapter
|
|
@prometheus_adapter ||= find_cluster_prometheus_adapter
|
|
end
|
|
|
|
def find_cluster_prometheus_adapter
|
|
integration = cluster&.integration_prometheus
|
|
integration if integration&.available?
|
|
end
|
|
end
|
|
end
|
|
end
|