Sha256: c1888f3655b57fcf5335182893f45d6c0c0fcec5e6c7eec2f58311d7889bacbd

Contents?: true

Size: 562 Bytes

Versions: 4

Compression:

Stored size: 562 Bytes

Contents

module RedisRing

  class MasterRPC

    attr_reader :http_client

    def initialize(http_client)
      @http_client = http_client
    end

    def connection(host, port)
      Connection.new(http_client, host, port)
    end

    class Connection

      attr_reader :http_client, :host, :port

      def initialize(http_client, host, port)
        @http_client = http_client
        @host = host
        @port = port
      end

      def node_loaded(node_id)
        http_client.post(host, port, "/master/node_joined/#{node_id}")
      end

    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
redis_ring-0.1.3 lib/redis_ring/master_rpc.rb
redis_ring-0.1.2 lib/redis_ring/master_rpc.rb
redis_ring-0.1.1 lib/redis_ring/master_rpc.rb
redis_ring-0.1.0 lib/redis_ring/master_rpc.rb