Basic storage driver interface, describing the lifecycle of a storage driver

Implements

Constructors

Properties

Methods

Constructors

Properties

states: Map<string, object> = ...

Methods

  • Type Parameters

    • T extends object

    Parameters

    • repo: string
    • def: () => T

    Returns T

  • Load session from some external storage. Should be used either to load data from file/network/etc to memory, or to open required connections to fetch data on demand

    May be called more than once, handle this with care (or use BaseStorageDriver that handles this for you)

    Returns void