Versions in this module Expand all Collapse all v0 v0.2.1 May 12, 2026 v0.2.0 May 6, 2026 v0.1.4 May 4, 2026 v0.1.3 May 4, 2026 v0.1.2 May 4, 2026 v0.1.1 May 4, 2026 v0.1.0 May 4, 2026 v0.0.8 May 4, 2026 v0.0.7 May 4, 2026 v0.0.6 Apr 29, 2026 v0.0.5 Apr 29, 2026 v0.0.4 Apr 29, 2026 Changes in this version + var ErrNoChanPermission = errors.New("NOPERM this user has no permissions to access one of the channels") + var ErrNoKeyPermission = errors.New("NOPERM this user has no permissions to access one of the keys") + var ErrNoPermission = errors.New("NOPERM this user has no permissions to run the command") + var ErrUserDisabled = errors.New("WRONGPASS invalid username-password pair or user is disabled") + var ErrUserNotFound = errors.New("ERR User not found") + var ErrWrongPassword = errors.New("WRONGPASS invalid username-password pair or user is disabled") + var Version = "dev" + func EffectsUsage() string + func GeneratePassword(bits int) (string, error) + func GetActiveEngine() *effects.Engine + func HashPassword(password string) ([]byte, error) + func InitializeCluster(cfg *EffectsConfig, handler shared.CommandHandler) error + func InitializeEffects(cfg *EffectsConfig) error + func Main(args []string) + func PrintEffectsConfig(cfg *EffectsConfig) + func Run(args []string) error + func StopCluster() + type ACLLogEntry struct + AgeSeconds float64 + ClientInfo string + Context string + Count int + EntryID int64 + Object string + Reason string + TimestampUsec int64 + Username string + type ACLManager struct + func NewACLManager() *ACLManager + func (m *ACLManager) Authenticate(username, password string) (*shared.ACLUser, error) + func (m *ACLManager) AuthenticateDefault() (*shared.ACLUser, bool) + func (m *ACLManager) CheckChannel(user *shared.ACLUser, channel string) error + func (m *ACLManager) CheckCommand(user *shared.ACLUser, cmd shared.CommandType) error + func (m *ACLManager) CheckKey(user *shared.ACLUser, key string, isWrite bool) error + func (m *ACLManager) DeleteUser(name string) bool + func (m *ACLManager) GetLog(count int) []ACLLogEntry + func (m *ACLManager) GetUser(name string) *shared.ACLUser + func (m *ACLManager) GetUsers() []string + func (m *ACLManager) LoadFromFile(path string) error + func (m *ACLManager) LogDenied(reason, context, object, username, clientInfo string) + func (m *ACLManager) RequiresAuth() bool + func (m *ACLManager) ResetLog() + func (m *ACLManager) SaveToFile(path string) error + func (m *ACLManager) SetUser(user *shared.ACLUser) + type ClientInfo struct + Addr string + Conn *shared.Connection + CreatedAt time.Time + DB int + Flags string + ID int64 + LastActive time.Time + LastCmd atomic.Pointer[string] + Name string + type ClientRegistry struct + func NewClientRegistry() *ClientRegistry + func (r *ClientRegistry) Count() int + func (r *ClientRegistry) CountBlocked() int + func (r *ClientRegistry) FormatClientList() string + func (r *ClientRegistry) GetByConn(conn *shared.Connection) *ClientInfo + func (r *ClientRegistry) GetByID(id int64) *ClientInfo + func (r *ClientRegistry) Register(conn *shared.Connection) *ClientInfo + func (r *ClientRegistry) SetLastCmd(conn *shared.Connection, cmd string) + func (r *ClientRegistry) Unblock(clientID int64, withError bool) bool + func (r *ClientRegistry) Unregister(conn *shared.Connection) + func (r *ClientRegistry) UpdateDB(conn *shared.Connection, db int) + type EffectsConfig struct + AdvertiseAddr string + ClusterPassphrase string + ClusterPort int + Enabled bool + JoinAddr string + MemoryLimit int64 + MemoryLimitPercent float64 + Port int + func RegisterEffectsFlags(fs *flag.FlagSet) *EffectsConfig + type Handler struct + func NewHandler(cfg HandlerConfig) *Handler + func (h *Handler) Close() + func (h *Handler) DebugEnabled() bool + func (h *Handler) ExecuteInto(cmd *shared.Command, w *shared.Writer, conn *shared.Connection) + func (h *Handler) GetAdaptiveStats() []cache.AdaptiveStats + func (h *Handler) GetCacheBytes() int64 + func (h *Handler) GetCacheEvictions() uint64 + func (h *Handler) GetDatabaseManager() *shared.DatabaseManager + func (h *Handler) GetItemCount() int + func (h *Handler) HandleForwardedTransaction(tx *pb.ForwardedTransaction) *pb.ForwardedResponse + func (h *Handler) NumDatabases() int + func (h *Handler) RequiresAuth() bool + func (h *Handler) SetClientRegistry(registry *ClientRegistry) + func (h *Handler) SetStats(stats *shared.Stats) + type HandlerConfig struct + ACLFile string + CapacityPerDB int + DebugLogging bool + Engine *effects.Engine + MemoryLimit int64 + NumDatabases int + Password string + RequireAuth bool + func DefaultHandlerConfig() HandlerConfig + type Logger struct + func NewLogger(debug bool) *Logger + func (l *Logger) IsDebug() bool + func (l *Logger) LogCommand(cmd *shared.Command, db int, clientAddr string) + func (l *Logger) LogResponse(clientAddr string, buf *bytes.Buffer) + func (l *Logger) LogUnknownCommand(cmd *shared.Command, clientAddr string) + type MetricsAdapter struct + func NewMetricsAdapter(stats *shared.Stats, handler shared.CommandHandler, memoryLimit int64) *MetricsAdapter + func (a *MetricsAdapter) AdaptiveKThresholds() map[int]int32 + func (a *MetricsAdapter) BlockedClients() int64 + func (a *MetricsAdapter) BytesRead() uint64 + func (a *MetricsAdapter) BytesWritten() uint64 + func (a *MetricsAdapter) CacheHits() uint64 + func (a *MetricsAdapter) CacheMisses() uint64 + func (a *MetricsAdapter) CasHits() uint64 + func (a *MetricsAdapter) CasMisses() uint64 + func (a *MetricsAdapter) CmdLatencyP50() float64 + func (a *MetricsAdapter) CmdLatencyP99() float64 + func (a *MetricsAdapter) CommandCounts() map[string]uint64 + func (a *MetricsAdapter) CommandErrors() map[string]uint64 + func (a *MetricsAdapter) CurrentConnections() int64 + func (a *MetricsAdapter) DeleteHits() uint64 + func (a *MetricsAdapter) DeleteMisses() uint64 + func (a *MetricsAdapter) Evictions() uint64 + func (a *MetricsAdapter) GetLatencyP50() float64 + func (a *MetricsAdapter) GetLatencyP99() float64 + func (a *MetricsAdapter) HitRate() float64 + func (a *MetricsAdapter) ItemCount() int + func (a *MetricsAdapter) MaxMemoryBytes() int64 + func (a *MetricsAdapter) MemoryBytes() int64 + func (a *MetricsAdapter) SetLatencyP50() float64 + func (a *MetricsAdapter) SetLatencyP99() float64 + func (a *MetricsAdapter) Subsystem() string + func (a *MetricsAdapter) TotalConnections() uint64 + func (a *MetricsAdapter) UptimeSeconds() float64 + type Server struct + func NewServer(config ServerConfig) (*Server, error) + func (s *Server) Addr() net.Addr + func (s *Server) Handler() shared.CommandHandler + func (s *Server) ListenAndServe() error + func (s *Server) Start() error + func (s *Server) Stats() *shared.Stats + func (s *Server) Stop() error + type ServerConfig struct + ACLFile string + Address string + CapacityPerDB int + DebugLogging bool + MaxConnections int + MemoryLimit int64 + NumAcceptors int + NumDatabases int + Password string + ReadBufferSize int + ReadTimeout time.Duration + TCPKeepAlive time.Duration + TLSCAFile string + TLSCertFile string + TLSKeyFile string + TLSMinVersion string + UnixSocket string + UnixSocketMode os.FileMode + WriteBufferSize int + WriteTimeout time.Duration + func DefaultServerConfig() ServerConfig + func (c *ServerConfig) TLSEnabled() bool v0.0.3 Apr 29, 2026 v0.0.2 Apr 29, 2026 v0.0.1 Apr 29, 2026