server

package
v0.0.0-...-3b800f5 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvlidArgs invalid args error
	ErrInvlidArgs = errors.New("invalid args")
)

Functions

This section is empty.

Types

type Cfg

type Cfg struct {
	AddrCli        string
	BufferCliRead  int
	BufferCliWrite int
	BatchCliResps  int64
	Node           *node.Cfg
	Metric         *util.MetricCfg
}

Cfg server configuration

func NewCfg

func NewCfg() *Cfg

NewCfg returns default cfg

type RedisServer

type RedisServer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

RedisServer is provide a redis like server

func (*RedisServer) Start

func (s *RedisServer) Start() error

Start used for start the redis server

func (*RedisServer) Stop

func (s *RedisServer) Stop() error

Stop is used for stop redis server

type Server

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

Server a server provide kv cache based on redis protocol

func NewServer

func NewServer(cfg *Cfg) *Server

NewServer create a server use spec cfg

func (*Server) Start

func (s *Server) Start()

Start start the server

func (*Server) Stop

func (s *Server) Stop()

Stop stop the server

Jump to

Keyboard shortcuts

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