Versions in this module Expand all Collapse all v0 v0.1.0 Jun 23, 2026 Changes in this version + type Config struct + Addr string + IdleTimeout time.Duration + MaxBulkLen int64 + MaxClients int + QueryBufLimit int64 + TCPKeepAlive time.Duration + UnixSocket string + UnixSocketPerm os.FileMode + type Conn struct + func NewOfflineConn() *Conn + func (c *Conn) CloseASAP() + func (c *Conn) Closed() <-chan struct{} + func (c *Conn) Created() time.Time + func (c *Conn) DB() int + func (c *Conn) Deliver(p []byte) error + func (c *Conn) Enc() *resp.Encoder + func (c *Conn) ID() uint64 + func (c *Conn) IsOffline() bool + func (c *Conn) LastInteraction() time.Time + func (c *Conn) LocalAddr() string + func (c *Conn) Name() string + func (c *Conn) OutBytes() []byte + func (c *Conn) Proto() int + func (c *Conn) Quit() + func (c *Conn) RemoteAddr() string + func (c *Conn) ResetOut() + func (c *Conn) Session() any + func (c *Conn) SetDB(db int) + func (c *Conn) SetName(name string) + func (c *Conn) SetProto(proto int) + func (c *Conn) SetSession(s any) + func (c *Conn) TotCmds() uint64 + func (c *Conn) TotNetIn() uint64 + func (c *Conn) TotNetOut() uint64 + func (c *Conn) WriteRaw(p []byte) + type DisconnectHandler interface + OnDisconnect func(c *Conn) + type Handler interface + Handle func(c *Conn, argv [][]byte) + type HandlerFunc func(c *Conn, argv [][]byte) + func (f HandlerFunc) Handle(c *Conn, argv [][]byte) + type PanicHandler interface + OnPanic func(cause any, stack []byte) + type Server struct + func New(cfg Config, handler Handler) *Server + func (s *Server) Addr() net.Addr + func (s *Server) Close() error + func (s *Server) ConnByID(id uint64) *Conn + func (s *Server) CountClients() int + func (s *Server) IdleTimeout() time.Duration + func (s *Server) ListenAndServe(cfg Config) error + func (s *Server) MaxBulkLen() int64 + func (s *Server) QueryBufLimit() int64 + func (s *Server) SetIdleTimeout(d time.Duration) + func (s *Server) SetMaxBulkLen(n int64) + func (s *Server) SetQueryBufLimit(n int64) + func (s *Server) SetTCPKeepAlive(d time.Duration) + func (s *Server) Snapshot() []*Conn + func (s *Server) TCPKeepAlive() time.Duration