📝More docs to one-of storage strategy
This commit is contained in:
committed by
Anton Shepilov
parent
d587c13c6b
commit
6c7dac388f
@@ -12,6 +12,14 @@ import { logger } from "../../../platform/framework";
|
|||||||
* OneOfStorageStrategy is responsible for managing multiple storage backends.
|
* OneOfStorageStrategy is responsible for managing multiple storage backends.
|
||||||
* It writes to, reads from, removes, and checks for the existence of files
|
* It writes to, reads from, removes, and checks for the existence of files
|
||||||
* across multiple storage systems.
|
* across multiple storage systems.
|
||||||
|
*
|
||||||
|
* WARNING: Be careful using this strategy. There is a very big probability that
|
||||||
|
* all storages won't be synchronized. You need to use external synchronization
|
||||||
|
* tools like rclone to keep them in sync.
|
||||||
|
* As far as all the objects in a storage are immutable you won't have inconsistent
|
||||||
|
* state of the object except it could've been deleted, and it's still exists in one
|
||||||
|
* of the storages. So you will need to have external procedures to clean up storages
|
||||||
|
* and make "garbage" collection.
|
||||||
*/
|
*/
|
||||||
export class OneOfStorageStrategy implements StorageConnectorAPI {
|
export class OneOfStorageStrategy implements StorageConnectorAPI {
|
||||||
constructor(private readonly storages: StorageConnectorAPI[]) {}
|
constructor(private readonly storages: StorageConnectorAPI[]) {}
|
||||||
|
|||||||
Reference in New Issue
Block a user