Sha256: 4d5e3705e0d41c5c40a4fa227147e779cdb16626e6393e112fe70764f113d5c9

Contents?: true

Size: 419 Bytes

Versions: 3

Compression:

Stored size: 419 Bytes

Contents

module BigBrother
  class ClusterFactory

    ACTIVE_PASSIVE_CLUSTER = 'active_passive'
    ACTIVE_ACTIVE_CLUSTER = 'active_active'

    CLUSTERS = {
      ACTIVE_PASSIVE_CLUSTER => ActivePassiveCluster,
      ACTIVE_ACTIVE_CLUSTER  => ActiveActiveCluster,
    }

    def self.create_cluster(name, attributes)
      CLUSTERS.fetch(attributes[:backend_mode], BigBrother::Cluster).new(name, attributes)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
big_brother-0.8.8.1 lib/big_brother/cluster_factory.rb
big_brother-0.8.8 lib/big_brother/cluster_factory.rb
big_brother-0.8.7 lib/big_brother/cluster_factory.rb