Sha256: 4f7fd0ef30d73730d2ce09971c12b4ef2076f371201879b2df3578bdc859c061

Contents?: true

Size: 811 Bytes

Versions: 18

Compression:

Stored size: 811 Bytes

Contents

# frozen_string_literal: true

class Redis
  module Commands
    module Cluster
      # Sends `CLUSTER *` command to random node and returns its reply.
      #
      # @see https://redis.io/commands#cluster Reference of cluster command
      #
      # @param subcommand [String, Symbol] the subcommand of cluster command
      #   e.g. `:slots`, `:nodes`, `:slaves`, `:info`
      #
      # @return [Object] depends on the subcommand
      def cluster(subcommand, *args)
        send_command([:cluster, subcommand] + args)
      end

      # Sends `ASKING` command to random node and returns its reply.
      #
      # @see https://redis.io/topics/cluster-spec#ask-redirection ASK redirection
      #
      # @return [String] `'OK'`
      def asking
        send_command(%i[asking])
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
redis-5.3.0 lib/redis/commands/cluster.rb
redis-5.2.0 lib/redis/commands/cluster.rb
redis-5.1.0 lib/redis/commands/cluster.rb
redis-5.0.8 lib/redis/commands/cluster.rb
redis-5.0.7 lib/redis/commands/cluster.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/redis-5.0.5/lib/redis/commands/cluster.rb
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/redis-5.0.5/lib/redis/commands/cluster.rb
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/redis-5.0.5/lib/redis/commands/cluster.rb
redis-5.0.6 lib/redis/commands/cluster.rb
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/redis-5.0.5/lib/redis/commands/cluster.rb
redis-5.0.5 lib/redis/commands/cluster.rb
redis-5.0.4 lib/redis/commands/cluster.rb
redis-5.0.3 lib/redis/commands/cluster.rb
redis-5.0.2 lib/redis/commands/cluster.rb
redis-5.0.1 lib/redis/commands/cluster.rb
redis-5.0.0 lib/redis/commands/cluster.rb
redis-5.0.0.beta4 lib/redis/commands/cluster.rb
redis-5.0.0.beta3 lib/redis/commands/cluster.rb