Type Alias ILockFactoryResolver<TAdapters>

ILockFactoryResolver: { use(adapterName?: TAdapters): ILockFactory }

Factory resolver contract for dynamically selecting lock factory implementations. Enables seamless switching between different storage backends and adapters at runtime. Implementations typically use adapter registration patterns to manage multiple implementations.

IMPORT_PATH: "@daiso-tech/core/lock/contracts"

Type Parameters

  • TAdapters extends string = string

Type declaration

  • use:function
    • Selects and returns a lock factory implementation. If an adapter name is provided, that specific implementation is returned. If no name is provided, the default registered adapter is used.

      Parameters

      • OptionaladapterName: TAdapters

        Optional name of a registered adapter implementation

      Returns ILockFactory

      The selected lock factory

      If the specified adapter name is not registered

      If no adapter name is provided and no default adapter is configured