Sha256: 43e4597b123a151e581b1557fbd6ffd4075a7950c86f3f7176c57194c6564a63

Contents?: true

Size: 400 Bytes

Versions: 2

Compression:

Stored size: 400 Bytes

Contents

require "dryad"
require "dryad/cluster/version"

module Dryad
  module Cluster
    class Error < StandardError; end

    class << self
      REGISTRY = Object.const_get(Dryad.configuration.registry)

      def round_robin(schema, service_name)
        groups = ['_global_', Dryad.configuration.group]
        REGISTRY.service_instances(service_name, schema, groups).first
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
dryad-0.1.0 dryad-cluster/lib/dryad/cluster.rb
dryad-cluster-0.1.0 lib/dryad/cluster.rb