Sha256: 9656a9715ad9fb744a3f2efa762c82a272e38f8b4f29ebecb3830b4cfda26834
Contents?: true
Size: 526 Bytes
Versions: 3
Compression:
Stored size: 526 Bytes
Contents
module Servicy class LoadBalancer attr_accessor :hosts def initialize @hosts = {} end def next(set) return nil if set.empty? hosts[set.first.name] ||= [] hosts[set.first.name] += set hosts[set.first.name].uniq! next_for_service(set.first.name) end def next_for_service(service_name) raise 'Not implemented' end end end Dir[File.expand_path(File.join(File.dirname(__FILE__), 'load_balancer')) + "/*.rb"].each do |f| require f.gsub(/.rb$/, '') end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
servicy-0.0.6 | lib/load_balancer.rb |
servicy-0.0.5 | lib/load_balancer.rb |
servicy-0.0.3 | lib/load_balancer.rb |