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

    Function getManager

    • Retrieves a RedisManager instance from the registry.

      Type Parameters

      • M extends RedisManager<RedisDefaultModules, RedisFunctions, RedisScripts, 3, TypeMapping> = RedisManager<RedisDefaultModules, RedisFunctions, RedisScripts, 3, TypeMapping>

        The specific RedisManager type to return, defaults to RedisManager

      Parameters

      • registry: Registry

        The Storehouse registry containing registered managers

      • OptionalmanagerName: string

        Optional name of the manager to retrieve. If omitted, retrieves the default manager

      Returns M

      The requested RedisManager instance

      If the manager is not found in the registry

      If the manager exists but is not an instance of RedisManager

      const redisManager = getManager(registry, 'redis-manager');
      await redisManager.connect();