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

Allow users to provide their own context #300

Open
1 task
tydomitrovich opened this issue Dec 2, 2022 · 3 comments
Open
1 task

Allow users to provide their own context #300

tydomitrovich opened this issue Dec 2, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@tydomitrovich
Copy link

Objective

Most of the methods in the AWS SDK for Go have a "WithContext" variant that allows callers to pass in a context. I have found this feature useful for cancelling long-running calls when the parent context is canceled. It would be nice to have a SyncWithContext() method with equivalent functionality.

Deliverables

  • A method that allows the caller to provide a context to the underlying sync code exists

Approach (optional)

It looks like the bulk of the code already accepts a context and the Sync method passes context.Background() to this code. We could add SyncWithContext() method that is identical to Sync() except that it uses a context parameter instead of Background(). Then Sync() could just call SyncWithContext() with context.Background() as a parameter.

@RA-Balaji
Copy link
Contributor

RA-Balaji commented Oct 23, 2023

I would like to contribute to this issue. Can I?

@at-wat at-wat added the enhancement New feature or request label Oct 30, 2023
@at-wat
Copy link
Member

at-wat commented Oct 30, 2023

@RA-Balaji sure, PR is welcomed!

@RA-Balaji
Copy link
Contributor

Kindly review the PR: #381

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

No branches or pull requests

3 participants