titan

package module
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2018 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Titan

Build Status Go Report Card Coverage Status

A distributed implementation of Redis compatible layer based on TiKV

Status

Active development, not ready for production. We welcome any form of contributions!

Features

  • Completely compatible with redis protocol
  • Full distributed transaction with strong consistency
  • Multi-tenancy support
  • No painful scale out
  • High availability

Thanks TiKV for supporting the core features

Installing

Deploy Titan

Benchmarks

Titan Benchmarks

Commands

Connections
  • auth
  • echo
  • ping
  • quit
  • select
  • swapdb, not supported
Transactions
  • multi
  • exec
  • discard
  • watch
  • unwatch
Server
  • client list
  • client kill
  • client pause
  • client reply
  • client getname
  • client setname
  • monitor
  • debug object
  • flushdb
  • flushall
  • time
  • command
  • command count
  • command getkeys
  • command info
  • info
  • slowlog
Keys
  • del
  • type
  • exists
  • expire
  • expireat
  • object
  • pexpire
  • pexpireat
  • ttl
  • pttl
  • randomkey
  • touch
  • keys
  • scan
  • unlink
Strings
  • get
  • set
  • mget
  • mset
  • strlen
  • incr
  • incrby
  • decr
  • decrby
  • append
  • bitcount
  • bitfield
  • bitop
  • bitpos
  • getbit
  • getrange
  • getset
  • incrbyfloat
  • msetnx
  • psetex
  • setbit
  • setex
  • setnx
  • setrange
List
  • lrange
  • linsert
  • lindex
  • llen
  • lset
  • lpush
  • lpop
  • lpushx
  • ltrim
  • lrem
  • rpop
  • rpoplpush
  • rpush
  • rpushhx
  • blpop
  • brpop
  • brpoplpush
Hashes
  • hset
  • hget
  • hgetall
  • hdel
  • hexists
  • hincrby
  • hincrbyfloat
  • hkeys
  • hlen
  • hmget
  • hmset
  • hscan
  • hsetnx
  • hstrlen
  • hvals
Sets
  • sadd
  • scard
  • sdiff
  • sdiffstore
  • sinter
  • sinterstore
  • sismember
  • smembers
  • smove
  • spop
  • srandmember
  • srem
  • sunion
  • sunionstore
  • sscan
Sorted Sets
  • bzpopmin
  • bzpopmax
  • zadd
  • zcard
  • zcount
  • zincrby
  • zinterstore
  • zlexcount
  • zpopmax
  • zpopmin
  • zrange
  • zrangebylex
  • zrevrangebylex
  • zrangebyscore
  • zrank
  • zrem
  • zremrangebylex
  • zremrangebyrank
  • zremrangebyscore
  • zrevrange
  • zrevrangebyscore
  • zrevrank
  • zscore
  • zunionstore
  • zscan
Geo
  • geoadd
  • geohash
  • geopos
  • geodist
  • georadius
  • georadiusbymember
hyperloglog
  • pfadd
  • pfcount
  • pfmerge
Pub/Sub
  • psubscribe
  • pubsub
  • publish
  • punsubscribe
  • subscribe
  • unsubscribe
Scripting
  • eval
  • evalsha
  • script debug
  • script exists
  • script flush
  • script kill
  • script load
Streams
  • xadd
  • xrange
  • xrevrange
  • xlen
  • xread
  • xreadgroup
  • xpending

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTraceID

func GenerateTraceID() string

GenerateTraceID grenerates a traceid for once a request

func GetClientID

func GetClientID() func() int64

GetClientID starts with 1 and allocates clientID incrementally

func PrintVersionInfo

func PrintVersionInfo()

PrintVersionInfo prints the server version info

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements the redis prototol server

func New

func New(ctx *context.ServerContext) *Server

New a server instance

func (*Server) GracefulStop

func (s *Server) GracefulStop() error

GracefulStop the server, TODO close clients connections first

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(addr string) error

ListenAndServe serves on a specified address

func (*Server) Serve

func (s *Server) Serve(lis net.Listener) error

Serve the redis requests

func (*Server) Stop

func (s *Server) Stop() error

Stop the server

Directories

Path Synopsis
bin
titan command
db
zlistproto
Package zlistproto is a generated protocol buffer package.
Package zlistproto is a generated protocol buffer package.
tools
test command
token command

Jump to

Keyboard shortcuts

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