Class: Gitlab::SidekiqLimits::Limit

Inherits:
Struct
  • Object
show all
Defined in:
lib/gitlab/sidekiq_limits.rb

Overview

name - <Symbol> name of the limit to be used in ApplicationRateLimiter resource_key - <Symbol> Key in SafeRequestStore which tracks a resource usage scopes - <String> Key in ApplicationContext or the worker_name metadata - <Hash> Hash containing metadata for various usage, e.g. emitting extra logs/metrics

or further logic checks before throttling.

threshold - <Integer> Maximum resource usage given an interval interval - <Integer> Seconds before a resource usage tracking is refreshed

Instance Attribute Summary collapse

Instance Attribute Details

#intervalObject

Returns the value of attribute interval

Returns:

  • (Object)

    the current value of interval



82
83
84
# File 'lib/gitlab/sidekiq_limits.rb', line 82

def interval
  @interval
end

#metadataObject

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



82
83
84
# File 'lib/gitlab/sidekiq_limits.rb', line 82

def 
  
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



82
83
84
# File 'lib/gitlab/sidekiq_limits.rb', line 82

def name
  @name
end

#resource_keyObject

Returns the value of attribute resource_key

Returns:

  • (Object)

    the current value of resource_key



82
83
84
# File 'lib/gitlab/sidekiq_limits.rb', line 82

def resource_key
  @resource_key
end

#scopesObject

Returns the value of attribute scopes

Returns:

  • (Object)

    the current value of scopes



82
83
84
# File 'lib/gitlab/sidekiq_limits.rb', line 82

def scopes
  @scopes
end

#thresholdObject

Returns the value of attribute threshold

Returns:

  • (Object)

    the current value of threshold



82
83
84
# File 'lib/gitlab/sidekiq_limits.rb', line 82

def threshold
  @threshold
end