Skip to content

LazyStream v1.4.0

Compare
Choose a tag to compare
@alexandre-daubois alexandre-daubois released this 28 Jun 08:07
· 5 commits to main since this release

Introducing MultiLazyStreamWriter. Here is a usage example:

use LazyStream\MultiLazyStreamWriter;

class BackupProvider
{
    public function provideData(): \Generator
    {
        // Yield backup data
    }
}

// Write your backups in many locations at once
$stream = new MultiLazyStreamWriter([
        'https://user:[email protected]/backup.json',
        'gs://backup_path/backup.json',
        's3://backup_path/backup.json',
    ],
    (new BackupProvider())->provideData()
);

$stream->trigger();