gitlab-org--gitlab-foss/lib/gitlab/usage_data_counters/search_counter.rb

23 lines
422 B
Ruby

# frozen_string_literal: true
module Gitlab
module UsageDataCounters
class SearchCounter < BaseCounter
KNOWN_EVENTS = %w[all_searches navbar_searches].freeze
class << self
def redis_key(event)
require_known_event(event)
"#{event}_COUNT".upcase
end
private
def counter_key(event)
"#{event}".to_sym
end
end
end
end
end