go-redis-server

A Go implementation of the Redis server protocol

  • Owner: docker-archive/go-redis-server
  • Platform:
  • License:: Apache License 2.0
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

Build Status

Redis server protocol library

There are plenty of good client implementations of the redis protocol, but not many server implementations.

go-redis-server is a helper library for building server software capable of speaking the redis protocol. This could be
an alternate implementation of redis, a custom proxy to redis, or even a completely different backend capable of
"masquerading" its API as a redis database.

Sample code

package main

import (
	redis "github.com/dotcloud/go-redis-server"
)

type MyHandler struct {
	values map[string][]byte
}

func (h *MyHandler) GET(key string) ([]byte, error) {
	v := h.values[key]
	return v, nil
}

func (h *MyHandler) SET(key string, value []byte) error {
	h.values[key] = value
	return nil
}

func main() {
	handler, _ := redis.NewAutoHandler(&MyHandler{values: make(map[string][]byte)})
	server := &redis.Server{Handler: handler, Addr: ":6389"}
	server.ListenAndServe()
}

Copyright (c) dotCloud 2013

Main metrics

Overview
Name With Ownerdocker-archive/go-redis-server
Primary LanguageGo
Program languageGo (Language Count: 1)
Platform
License:Apache License 2.0
所有者活动
Created At2013-07-23 17:45:00
Pushed At2018-10-30 19:34:39
Last Commit At2013-08-30 13:48:22
Release Count0
用户参与
Stargazers Count403
Watchers Count30
Fork Count118
Commits Count79
Has Issues Enabled
Issues Count7
Issue Open Count3
Pull Requests Count15
Pull Requests Open Count6
Pull Requests Close Count1
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private