go-redis-server

A Go implementation of the Redis server protocol

  • 所有者: docker-archive/go-redis-server
  • 平台:
  • 许可证: Apache License 2.0
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

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

主要指标

概览
名称与所有者docker-archive/go-redis-server
主编程语言Go
编程语言Go (语言数: 1)
平台
许可证Apache License 2.0
所有者活动
创建于2013-07-23 17:45:00
推送于2018-10-30 19:34:39
最后一次提交2013-08-30 13:48:22
发布数0
用户参与
星数403
关注者数30
派生数118
提交数79
已启用问题?
问题数7
打开的问题数3
拉请求数15
打开的拉请求数6
关闭的拉请求数1
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?