radix

package module
v0.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2015 License: MIT Imports: 0 Imported by: 0

README

Radix

Radix is a minimalistic Redis client for Go. It is broken up into the following:

  • redis - A wrapper around a single redis connection. Supports normal commands/response as well as pipelining.

    • resp - A utility package for encoding and decoding messages from redis
  • extra - a sub-package containing added functionality

    • pool - a simple, automatically expanding/cleaning connection pool.

    • pubsub - a simple wrapper providing convenient access to Redis Pub/Sub functionality.

    • sentinel - a client for redis sentinel which acts as a connection pool for a cluster of redis nodes. A sentinel client connects to a sentinel instance and any master redis instances that instance is monitoring. If a master becomes unavailable, the sentinel client will automatically start distributing connections from the slave chosen by the sentinel instance.

    • cluster - a client for a redis cluster which automatically handles interacting with a redis cluster, transparently handling redirects and pooling. This client keeps a mapping of slots to nodes internally, and automatically keeps it up-to-date.

Installation

go get github.com/fzzy/radix/redis

Testing

go get -u github.com/stretchr/testify
make test

The test action assumes you have a redis server listening on port 6379. It will adiitionally bring up and tear down redis cluster nodes on ports 7000 and 7001. You can specify the path to redis-server to use when setting up cluster like so:

make REDIS_SERVER=/path/to/redis-server test

Copyright 2013 Juhani Åhman. Unless otherwise noted, the source files are distributed under the MIT License found in the LICENSE file.

Documentation

Overview

Radix is a simple redis driver. This top-level package is a wrapper for its two sub-packages: redis, which contains the single-connection redis client (the most commonly used part of this package) and extra, which contains other sub-packages for doing things like pooling connections and interacting with a redis cluster.

Directories

Path Synopsis
extra
cluster
Package cluster implements an almost drop-in replacement for a normal Client which accounts for a redis cluster setup.
Package cluster implements an almost drop-in replacement for a normal Client which accounts for a redis cluster setup.
pool
The pool package implements a connection pool for redis connections which is thread-safe
The pool package implements a connection pool for redis connections which is thread-safe
pubsub
The pubsub package provides a wrapper around a normal redis client which makes interacting with subscribe commands much easier
The pubsub package provides a wrapper around a normal redis client which makes interacting with subscribe commands much easier
sentinel
The sentinel package provides a convenient interface with a redis sentinel which will automatically handle pooling connections and automatic failover.
The sentinel package provides a convenient interface with a redis sentinel which will automatically handle pooling connections and automatic failover.
A simple client for connecting and interacting with redis.
A simple client for connecting and interacting with redis.
resp
This package provides an easy to use interface for creating and parsing messages encoded in the REdis Serialization Protocol (RESP).
This package provides an easy to use interface for creating and parsing messages encoded in the REdis Serialization Protocol (RESP).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL