handler

package
v0.0.0-...-96d424b Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeString    = '+'
	TypeError     = '-'
	TypeInt       = ':'
	TypeBulkBytes = '$'
	TypeArray     = '*'
)
View Source
const (
	//支持单个key存储最大512MB的数据.
	MaxBulkBytesLen = 1024 * 1024 * 512
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Conn       net.Conn
	IP         string
	Reader     *bufio.Reader
	ServerConn net.Conn
}

type Proxy

type Proxy struct {
	Addr        string
	Ch          chan bool
	Etcd        *clientv3.Client
	Lock        *sync.RWMutex
	CacheServer map[string]net.Conn
}

func NewProxy

func NewProxy() Proxy

NewProxy.

func (*Proxy) NewClient

func (p *Proxy) NewClient(conn net.Conn) *Client

func (*Proxy) NewReais

func (p *Proxy) NewReais(cli *Client) *Redis

func (*Proxy) Start

func (p *Proxy) Start()

type Redis

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

func (*Redis) Parse

func (r *Redis) Parse() (proto RedisProto, err error)

解析redis协议.

type RedisEngine

type RedisEngine interface {
}

type RedisProto

type RedisProto struct {
	Command string
	Args    [][]byte
}

Jump to

Keyboard shortcuts

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