Skip to content

feat(client): Add ClientTrackingFlag enum for ClientTrackingInfo.Flags #523

Description

@currantw

Describe the feature

The ClientTrackingInfo.Flags property currently uses IReadOnlySet<string> to represent tracking flags (e.g. "on", "off", "bcast", "optin", "optout", "noloop"). For consistency with ClientFlag, ClientCapability, and FileDescriptorEvent, this should be replaced with a typed enum.

Use Case

Type safety and discoverability. Currently users must compare against magic strings ("on", "bcast", etc.) which is error-prone. A typed enum provides IntelliSense, compile-time checking, and consistency with the patterns established in ClientInfo.

Proposed Solution

Add a ClientTrackingFlag enum:

public enum ClientTrackingFlag
{
    On,
    Off,
    Broadcast,
    OptIn,
    OptOut,
    NoLoop,
}

Change ClientTrackingInfo.Flags from IReadOnlySet<string> to IReadOnlySet<ClientTrackingFlag>.

Update the response converter in Request.ConnectionManagement.cs to map string values to enum values.

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

Related

Additional Information

⚪ None

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

coreCore library (`sources/Valkey.Glide/`)triageNeeds triage — not yet reviewed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions