@valkey/valkey-glide
    Preparing search index...

    Interface StandalonePubSubState

    Represents the subscription state for a standalone client.

    This interface provides information about the current PubSub subscriptions for a standalone client. It includes both the desired subscriptions (what the client wants to maintain) and the actual subscriptions (what is currently established on the server).

    The subscriptions are organized by channel mode:

    • Exact: Exact channel names
    • Pattern: Channel patterns using glob-style matching
    const state = await client.getSubscriptions();
    console.log("Desired exact channels:", state.desiredSubscriptions[GlideClientConfiguration.PubSubChannelModes.Exact]);
    console.log("Actual exact channels:", state.actualSubscriptions[GlideClientConfiguration.PubSubChannelModes.Exact]);
    interface StandalonePubSubState {
        actualSubscriptions: Partial<
            Record<GlideClientConfiguration.PubSubChannelModes, Set<GlideString>>,
        >;
        desiredSubscriptions: Partial<
            Record<GlideClientConfiguration.PubSubChannelModes, Set<GlideString>>,
        >;
    }
    Index

    Properties

    actualSubscriptions: Partial<
        Record<GlideClientConfiguration.PubSubChannelModes, Set<GlideString>>,
    >

    Actual subscriptions currently active on the server. These are the subscriptions that are actually established.

    desiredSubscriptions: Partial<
        Record<GlideClientConfiguration.PubSubChannelModes, Set<GlideString>>,
    >

    Desired subscriptions organized by channel mode. These are the subscriptions the client wants to maintain.