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

Flush to receive go context type #746

Open
sermio-te opened this issue Nov 17, 2023 · 1 comment · May be fixed by #935
Open

Flush to receive go context type #746

sermio-te opened this issue Nov 17, 2023 · 1 comment · May be fixed by #935
Assignees

Comments

@sermio-te
Copy link

Summary

Currently Flush function receives a timeout, so when it is called someone needs to provide a timeout value. By using a context of the app and propagating to Flush the operation will timeout whenever the context expires, so no explicit timeout is needed.

Motivation

This solution will remove some corner-case in the blocking operations of an application. If a long timeout is specified the application might wait for long. If the application already performs some finalisation and has an overall shutdown timeout, we would need to calculate the duration left to timeout, in order to provide to Flush.

Additional Context

@greywolve
Copy link
Contributor

greywolve commented Nov 17, 2023

This is definitely more in the spirit of Go, but we also need to respect the unified API for consistency across the various language SDKs.

Perhaps we could add a more Go specific Flush in addition to the common API?

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

Successfully merging a pull request may close this issue.

5 participants