| 123456789101112131415161718192021222324252627282930 |
- // Author: simon (ynwdlxm@163.com)
- // Date: 2025/9/12 14:57
- // Desc:
- package database
- import (
- "github.com/runningwater/go-redis/interface/resp"
- "github.com/runningwater/go-redis/lib/logger"
- "github.com/runningwater/go-redis/resp/reply"
- )
- type EchoDatabase struct {
- }
- func NewEchoDatabase() *EchoDatabase {
- return &EchoDatabase{}
- }
- func (e *EchoDatabase) Exec(_ resp.Connection, args [][]byte) resp.Reply {
- return reply.NewMultiBulkReply(args)
- }
- func (e *EchoDatabase) Close() {
- logger.Info("database closed")
- }
- func (e *EchoDatabase) AfterClientClose(_ resp.Connection) {
- logger.Info("client closed, AfterClientClose")
- }
|