Documentation ¶
Index ¶
- Constants
- func NewServer(port string, sizeLimit int) *server
- type Cache
- func (c *Cache) Exists(key string) int
- func (c *Cache) Expire(key string, ttl int) int
- func (c *Cache) Flush()
- func (c *Cache) Get(key string) (value []byte, err error)
- func (c *Cache) GetSize() int
- func (c *Cache) GetSizeLimit() int
- func (c *Cache) HDel(key string, kk []string) (num int, err error)
- func (c *Cache) HExists(key, k string) (num int, err error)
- func (c *Cache) HGet(key string, vk string) (value []byte, err error)
- func (c *Cache) HGetAll(key string) (value [][]byte, err error)
- func (c *Cache) HSet(key string, vk string, vv []byte) (err error)
- func (c *Cache) Remove(key []string) (num int)
- func (c *Cache) Set(key string, value []byte) (err error)
- func (c *Cache) SetSizeLimit(sizeLimit int)
- func (c *Cache) Stop()
- type Conn
- type Reader
- type Writer
Constants ¶
View Source
const ( KB = 1 << 10 MB = 1 << 20 GB = 1 << 30 Millisecond = 1 Second = 1000 Minute = 60000 )
View Source
const ( ErrorReply = '-' StatusReply = '+' IntReply = ':' StringReply = '$' ArrayReply = '*' )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) GetSizeLimit ¶
func (*Cache) SetSizeLimit ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) ReadRequest ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func (*Writer) NullStringArray ¶
func (*Writer) StringArray ¶
Click to show internal directories.
Click to hide internal directories.