Add stub database selection, and fix differences between pekoe and c-redis
- PUBSUB CHANNELS glob pattern matching - Implement SELECT + max DB validation (0-15) (default db max is 16), for perl clients - CLIENT KILL ID (single/range) + MAXAGE - CLIENT INFO events + resp fields - PUBSUB SHARDCHANNELS/SHARDNUMSUB stubs
This commit is contained in:
@@ -21,6 +21,8 @@ import (
|
||||
"github.com/eleksir/pekoe/internal/pubsub"
|
||||
)
|
||||
|
||||
const MaxDatabases = 16 // Redis default maximum databases (0-15)
|
||||
|
||||
// Sentinel errors for connection handling
|
||||
var (
|
||||
ErrQuit = errors.New("client quit")
|
||||
@@ -276,6 +278,8 @@ func (s *Server) processCommand(client *pubsub.Client, cmd *Command, writer *Con
|
||||
return s.handleQuit(client, writer)
|
||||
case "client":
|
||||
return s.handleClient(client, cmd.Args[1:], writer)
|
||||
case "select":
|
||||
return s.handleSelect(client, cmd.Args[1:], writer)
|
||||
default:
|
||||
// Check if client is in pubsub mode - only pubsub commands allowed
|
||||
if client != nil && (client.SubsCount() > 0 || client.PatternSubsCount() > 0) {
|
||||
|
||||
Reference in New Issue
Block a user