gorelib

package module
v0.0.0-...-a11d02e Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2015 License: MIT Imports: 0 Imported by: 0

README

GoReLib

GoDoc

Collection of minimalistic libraries for golang using, hopefully clustered, redis servers.

  • cache - A cache implementation

  • Supports an interface{} type for a cache key and value. Marshal/Unmarshal would be performed when needed. You may override them with your own marshal functions.

  • Provides a serial of the value with a form of an unix timestamp in millis. It could be used for validity, and possibly consistent, checks when using clustered connectors. Redis nodes on clusterized environments could go on and off inadvertently. Having serials could be useful on automatic cache invalidation.

  • Provides CheckAndSet method for more consistent CAS update patterns. When a long-taken or complex update needed, you could consider CAS patterns for the transaction using serial values.

  • connector - A collection of connector implementations for the gorelib

  • checker - A checker implementations for the clustered redis instances

  • zkcluster - The connector and relevant components for the zookeeper assisted redis cluster. The connector should read cluster information and its shard status from the zookeeper. Separate checkers would update shard status in the zookeeper. Multiple checkers which would do quorum-like decisions on status changes are also possible.

Features

  • Use radix.v2 as connectors. You may use any connector you want which is compatible with the client of the radix.

  • Clustered redis interface which supports shard-to-shards failover.

  • Cluster implementation assisted by the zookeeper. It also has separately runnable health checkers which make quorum-like decisions.

Installation

go get github.com/beatuslapis/gorelib.v0/...

Testing

go test github.com/beatuslapis/gorelib.v0/...

The test action assumes you have the following running:

  • A redis server listening on port 6379
  • A zookeeper server listening on port 2181

Unless otherwise noted, the source files are distributed under the MIT License found in the LICENSE.txt file.

Documentation

Overview

Collection of minimalistic libraries for golang using, hopefully clustered, redis servers.

Directories

Path Synopsis
A minimalistic cache implementation for golang using, hopefully clusterized, redis servers.
A minimalistic cache implementation for golang using, hopefully clusterized, redis servers.
Checker implementations for a cluster connector localchecker - Check status of clustered redis instances.
Checker implementations for a cluster connector localchecker - Check status of clustered redis instances.
connector
zkcluster - A connector for a zookeeper assisted redis cluster.
zkcluster - A connector for a zookeeper assisted redis cluster.

Jump to

Keyboard shortcuts

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