Class ObjectStorageServiceCollectionExtensions
- Namespace
- MailFathom.Infrastructure.ObjectStorage
- Assembly
- MailFathom.Infrastructure.dll
Registers everything a deployment needs to reach its S3-compatible endpoint.
public static class ObjectStorageServiceCollectionExtensions
- Inheritance
-
ObjectStorageServiceCollectionExtensions
- Inherited Members
Remarks
Called only where the deployment selected the object-storage backend, which is why nothing here is conditional
afterwards: an instance storing content in the database registers none of it, opens no transport, and probes nothing.
That is also what keeps the integration harness free of it — the call is the composition root's, not
AddInfrastructure's, so a suite that never selects the backend never has to supply its inputs.
The endpoint is composed by the caller because it comes from configuration and this boundary binds none. The credential source is not a parameter at all: the composition root registers its own implementation of IObjectStorageCredentialSource as a separate singleton, because references, schemes, and resolution rules stay there and what crosses this boundary is material with a defined lifetime. So this method registers what consumes the credentials and never what produces them.
Methods
- AddObjectStorage(IServiceCollection, ObjectStorageEndpoint, ContentObjectReclamationBounds, ConfiguredSecret?)
Registers the object-storage transport, its client, its telemetry, its readiness probe, the content store that writes through it, and the sweep that reclaims what nothing points at.