@storehouse/redis - v0.1.0
    Preparing search index...

    Function getPoolConnection

    • Retrieves the underlying Redis client connection from a manager in the registry.

      Type Parameters

      • M extends RedisModules = RedisDefaultModules

        Redis modules type, defaults to RedisDefaultModules

      • F extends RedisFunctions = RedisFunctions

        Redis functions type, defaults to RedisFunctions

      • S extends RedisScripts = RedisScripts

        Redis scripts type, defaults to RedisScripts

      • RESP extends RespVersions = 3

        Redis RESP protocol version, defaults to 3

      • TYPE_MAPPING extends TypeMapping = TypeMapping

        Redis type mapping, defaults to TypeMapping

      Parameters

      • registry: Registry

        The Storehouse registry containing registered managers

      • OptionalmanagerName: string

        Optional name of the manager. If omitted, uses the default manager

      Returns RedisClientPoolType<M, F, S, RESP, TYPE_MAPPING>

      The Redis client instance

      If the manager is not found in the registry

      const redisClient = getPoolConnection(registry, 'redis-pool-manager');
      await redisClient.set('key', 'value');
      const value = await redisClient.get('key');