Skip to content

feat(client): Add CLIENT INFO command support #414

Description

@currantw

Describe the feature

Add CLIENT INFO command support to the Valkey GLIDE C# client. The CLIENT INFO command returns information and statistics about the current client connection in a human-readable format. It is supported by Valkey GLIDE core (request type ClientInfo) but is not yet implemented in the C# client.

Unlike CLIENT LIST (which returns info for all connected clients), CLIENT INFO returns info only for the current connection. The output format is the same single-line format used by CLIENT LIST, so the existing ClientInfo parsing type (introduced for CLIENT LIST in #277) can be reused.

Use Case

Users need to inspect the current connection's metadata (e.g., client ID, name, flags, database, subscriptions, connection age) for diagnostics, monitoring, and debugging purposes — without requiring the overhead or permissions of listing all clients.

Proposed Solution

  • Add GLIDE-native CLIENT INFO methods to the client interfaces (IBaseClient, IClusterClient) and implement in GlideClient and GlideClusterClient. Refer to the other Valkey GLIDE clients (Java, Python, Go, Node) for signature conventions and return types.
  • Reuse the ClientInfo type introduced for CLIENT LIST (feat: Add CLIENT LIST command support #277) to parse the response.
  • No SER compatibility needed — StackExchange.Redis does not expose a CLIENT INFO method on IServer (unlike CLIENT LIST, which it does support).

Acknowledgements

  • I may be able to implement this feature request
  • This feature might cause a breaking change

Related

Additional Information

  • CLIENT INFO was introduced in Redis 6.2 / Valkey 7.2.
  • The command takes no arguments and returns a single line in the same format as CLIENT LIST.
  • The glide-core request type is ClientInfo = 306.

Metadata

Metadata

Assignees

Labels

coreCore library (`sources/Valkey.Glide/`)

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions