Storage Services

Tags: services

The services defined by the storage application are listed below, and will vary depending on settings.

With SQL blob storage

When the blob storage is of “sql” type, the following services are available:

storage:
  blobs:
    type: sql

Final class for a service collection. Iterate on it to get a flattened (one level) and merged (services with same name that allows overrides are merged together) list of services.

service storage harp_apps.storage.services.sql.SqlStorage

Base: harp_apps.storage.types.storage.IStorage

Main storage facade, most probably based on the underlying sql/sqlalchemy implementation.

service storage.blobs harp_apps.storage.services.blob_storages.sql.SqlBlobStorage

Base: harp_apps.storage.types.IBlobStorage

SQL based Blob Storage.

service storage.engine harp_apps.storage.engines.SQLAlchemyEngine

Base: sqlalchemy.ext.asyncio.AsyncEngine

SQLAlchemy Engine.

url: NoneType = None
service storage.worker harp_apps.storage.worker.StorageAsyncWorkerQueue

Storage async worker

With Redis blob storage

When the blob storage is of “redis” type, the following services are available:

storage:
  blobs:
    type: redis

Final class for a service collection. Iterate on it to get a flattened (one level) and merged (services with same name that allows overrides are merged together) list of services.

service storage harp_apps.storage.services.sql.SqlStorage

Base: harp_apps.storage.types.storage.IStorage

Main storage facade, most probably based on the underlying sql/sqlalchemy implementation.

service storage.blobs harp_apps.storage.services.blob_storages.redis.RedisBlobStorage

Base: harp_apps.storage.types.IBlobStorage

Redis based Blob Storage.

client: LazyServiceReference = LazyServiceReference('storage.redis')
service storage.engine harp_apps.storage.engines.SQLAlchemyEngine

Base: sqlalchemy.ext.asyncio.AsyncEngine

SQLAlchemy Engine.

url: NoneType = None
service storage.redis harp_apps.storage.services.redis.Redis

Base: redis.asyncio.Redis

Asynchronous Redis Client.

url: str = 'redis://localhost:6379/0'
service storage.worker harp_apps.storage.worker.StorageAsyncWorkerQueue

Storage async worker

To customize the Redis client, you can override the blobs.redis settings in your configuration:

storage:
  blobs:
    type: redis
  redis:
    url: redis://localhost:6379/0 # this is the default, only set to override