class ExternalStorage: (source)
Configuration for external storage behavior.
Warning
This API is experimental.
Validate drivers and build the internal name-keyed driver map.
Raises ValueError if no drivers are provided, if
payload_size_threshold is less than zero, if more than one
driver is registered without a driver_selector, or if any two
drivers share the same name.
Callable[ [ StorageDriverSelectContext, Payload], StorageDriver | None] | None =
(source)
¶
Controls which driver stores a given payload. A callable that returns the
driver instance to use, or None to leave the payload stored inline.
The returned driver must be one of the instances registered in
drivers.
Required when more than one driver is registered. When None and only one driver is registered, that driver is used for all store operations.
Drivers available for storing and retrieving payloads. At least one
driver must be provided. If more than one driver is registered,
driver_selector must also be set.
Drivers in this list are looked up by StorageDriver.name during
retrieval, so each driver must have a unique name.
Minimum payload size in bytes before external storage is considered. Defaults to 256 KiB. Must be greater than or equal to zero.
Undocumented
Sequence[ Payload]) -> list[ Payload]:
(source)
¶
Undocumented
StorageDriverSelectContext, payload: Payload) -> StorageDriver | None:
(source)
¶
Returns the driver to use for this payload, or None to pass through.
Sequence[ StorageDriverClaim], expected: int, driver: StorageDriver):
(source)
¶
Undocumented
Sequence[ Payload], expected: int, driver: StorageDriver):
(source)
¶
Undocumented
