module Lhm::Throttler

Constants

CLASSES

Public Class Methods

format_hosts(hosts) click to toggle source
# File lib/lhm/throttler/slave_lag.rb, line 4
def self.format_hosts(hosts)
  formatted_hosts = []
  hosts.each do |host|
    if host && !host.match(/localhost/) && !host.match(/127.0.0.1/)
      formatted_hosts << host.partition(':')[0]
    end
  end
  formatted_hosts
end

Public Instance Methods

setup_throttler(type, options = {}) click to toggle source
# File lib/lhm/throttler.rb, line 15
def setup_throttler(type, options = {})
  @throttler = Factory.create_throttler(type, options)
end
throttler() click to toggle source
# File lib/lhm/throttler.rb, line 11
def throttler
  @throttler ||= Throttler::Time.new
end