Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite internal asynchronous mechanism to promise and async iterator #1154

Open
trim21 opened this issue May 18, 2023 · 0 comments
Open

Rewrite internal asynchronous mechanism to promise and async iterator #1154

trim21 opened this issue May 18, 2023 · 0 comments

Comments

@trim21
Copy link
Contributor

trim21 commented May 18, 2023

Rewrite internal asynchronous mechanism to promise and async iterator

Currently this project use callback and stream to handle asynchronous flow control.

Now with Promise(async/await) and AsyncGenerator, we will be about to write asynchronous code like synchronous code.

stream.Readable support Readable.from(generate()), so we only need add it to change public api result, and use async generator internally.

what will changed: list*, putObject, fPutObject.

Also remove ObjectUploader, this class is used internally, so also non-breaking change

a promise async/await version of fPutObject for compare(no api change)

https://github.com/trim21/minio-js/blob/81095dc271c7be78636afdb2d67219d300422a6c/src/main/client.ts#L1281-L1306

async.waterfall(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant