mirror of
https://github.com/redis/go-redis.git
synced 2025-04-25 04:02:31 +03:00
Add new key io-thread
in client info
Redis 8.0 introduces new key `io-thread` in the response for client info. The key needs to be parsed. If an unknown key is observed, the client will return an error.
This commit is contained in:
parent
787c41f429
commit
a170140822
@ -5114,6 +5114,7 @@ type ClientInfo struct {
|
||||
OutputListLength int // oll, output list length (replies are queued in this list when the buffer is full)
|
||||
OutputMemory int // omem, output buffer memory usage
|
||||
TotalMemory int // tot-mem, total memory consumed by this client in its various buffers
|
||||
IoThread int // io-thread id
|
||||
Events string // file descriptor events (see below)
|
||||
LastCmd string // cmd, last command played
|
||||
User string // the authenticated username of the client
|
||||
@ -5292,6 +5293,8 @@ func parseClientInfo(txt string) (info *ClientInfo, err error) {
|
||||
info.LibName = val
|
||||
case "lib-ver":
|
||||
info.LibVer = val
|
||||
case "io-thread":
|
||||
info.IoThread, err = strconv.Atoi(val)
|
||||
default:
|
||||
return nil, fmt.Errorf("redis: unexpected client info key(%s)", key)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user