class StorageDriver(ABC): (source)
Base driver for storing and retrieve payloads from external storage systems.
Warning
This API is experimental.
| Method | name |
Returns the name of this driver instance. A driver may allow its name to be parameterized at construction time so that multiple instances of the same driver class can coexist in ExternalStorage.drivers... |
| Async Method | retrieve |
Retrieves payloads from external storage for the given StorageDriverClaim list. The returned list must be the same length as claims. |
| Async Method | store |
Stores payloads in external storage and returns a StorageDriverClaim for each one. The returned list must be the same length as payloads. |
| Method | type |
Returns the type of the storage driver. This string should be the same across all instantiations of the same driver class. This allows the equivalent driver implementation in different languages to be named the same. |
Returns the name of this driver instance. A driver may allow
its name to be parameterized at construction time so that multiple
instances of the same driver class can coexist in
ExternalStorage.drivers with distinct names.
StorageDriverRetrieveContext, claims: Sequence[ StorageDriverClaim]) -> list[ Payload]:
(source)
¶
Retrieves payloads from external storage for the given
StorageDriverClaim list. The returned list must be the same
length as claims.
StorageDriverStoreContext, payloads: Sequence[ Payload]) -> list[ StorageDriverClaim]:
(source)
¶
Stores payloads in external storage and returns a
StorageDriverClaim for each one. The returned list must be the
same length as payloads.
Returns the type of the storage driver. This string should be the same across all instantiations of the same driver class. This allows the equivalent driver implementation in different languages to be named the same.
Defaults to the class name. Subclasses may override this to return a stable, language-agnostic identifier.