class ExternalStorage: (source)
Configuration for external storage behavior.
Warning
This API is experimental.
| Method | __post |
Validate drivers and build the internal name-keyed driver map. |
| Class Variable | driver |
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 ... |
| Class Variable | drivers |
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. |
| Class Variable | payload |
Minimum payload size in bytes before external storage is considered. Defaults to 256 KiB. Must be greater than or equal to zero. |
| Static Method | _record |
Undocumented |
| Method | _get |
Looks up a driver by name, raising ValueError if not found. |
| Async Method | _retrieve |
Undocumented |
| Async Method | _retrieve |
Undocumented |
| Async Method | _retrieve |
Undocumented |
| Method | _select |
Returns the driver to use for this payload, or None to pass through. |
| Async Method | _store |
Undocumented |
| Async Method | _store |
Undocumented |
| Async Method | _store |
Undocumented |
| Method | _validate |
Undocumented |
| Method | _validate |
Undocumented |
| Method | _with |
Return a copy of this instance with ctx bound as the store context. |
| Class Variable | _claim |
Undocumented |
| Class Variable | _driver |
Name-keyed index of drivers, built at construction time. Used for retrieval lookups. |
| Class Variable | _store |
Store context bound to this instance via _with_store_context. |
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[ [ StorageDriverStoreContext, 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.
Sequence[ Payload]) -> list[ Payload]:
(source)
¶
Undocumented
StorageDriverStoreContext, 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