swh.objstorage.api.server module#
- class swh.objstorage.api.server.ObjStorageServerApp(*args, backend_class=None, backend_factory=None, **kwargs)[source]#
Bases:
RPCServerApp
- client_exception_classes = (<class 'swh.objstorage.exc.Error'>, <class 'swh.objstorage.exc.NoBackendsLeftError'>, <class 'swh.objstorage.exc.ObjCorruptedError'>, <class 'swh.objstorage.exc.ObjNotFoundError'>)#
- method_decorators: List[Callable[[Callable], Callable]] = [<function timed>]#
List of decorators to all methods generated from the
backend_class
.
- swh.objstorage.api.server.load_and_check_config(config_file)[source]#
- Check the minimal configuration is set to run the api or raise an
error explanation.
- Parameters:
config_file (str) – Path to the configuration file to load
- Raises:
Error if the setup is not as expected –
- Returns:
configuration as a dict