Sha256: f0e6e107daf370ce7b6d11ffcdb6a63d50085e5acb145424f11da9c4ca9c50db

Contents?: true

Size: 348 Bytes

Versions: 1

Compression:

Stored size: 348 Bytes

Contents

# frozen_string_literal: true

require 'uri'

module Quiq
  class Redis
    DEFAULT_REDIS_URL = 'redis://localhost:6379'

    attr_reader :client

    def initialize(server = DEFAULT_REDIS_URL)
      uri = URI(server)
      endpoint = Async::IO::Endpoint.tcp(uri.host, uri.port)
      @client = Async::Redis::Client.new(endpoint)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
quiq-0.2.0 lib/quiq/redis.rb