Skip to content

Conversation

jpcoenen
Copy link
Contributor

This allows the usage of stores that use a context, for example to cancel a request or to perform tracing. Saw this being discussed in #67 and #57.

All functions and interfaces that have changed signatures, have Ctx as a suffix to maintain full backwards compatibility and provide a smooth migration path. Or at least... I think so.

Not all context's are actually used yet. All the old stores just use an adapter around the old store that silently drops the provided context. But having it in the signature, allow the stores to be changed gradually. And I also have a PR incoming for using it with redis-go.v8.

Documentation can maybe use some work. So any suggestions regarding this or any feedback on the used approach are very welcome!

@Espina2
Copy link

Espina2 commented Aug 13, 2021

What is blocking this PR to be merged?

@brandur
Copy link
Member

brandur commented Aug 6, 2022

And actually @jpcoenen, it might be even better were you to rebase this one, I could bring it in, and then #84 could be rebased again so that it's diff is more sane for posterity's sake.

This allows the usage of stores that use a context, for example to cancel a request or to perform tracing.

All functions and interfaces that have changed signatures, have Ctx as a suffix to maintain full backwards compatibility and provide a smooth migration path.
@jpcoenen
Copy link
Contributor Author

Took me a while to get to it, but both branches are up-to-date again. First merging this one and then #84 should do the trick.

@jpcoenen
Copy link
Contributor Author

@brandur Is there anything left to get this merged?

@brandur
Copy link
Member

brandur commented Mar 25, 2023

Doh, sorry @jpcoenen — dropped this again. I looked through this and it seems solid. I think it'd be a little surprising for people when they find out that the stores don't really do anything with the context, but it's still movement in the right direction and updating the stores will chunk out nicely as separate work.

@brandur brandur merged commit 3ebfa3d into throttled:master Mar 25, 2023
brandur added a commit that referenced this pull request Mar 25, 2023
A few extra newlines and line wrapping in the README to follow up new
changes in #83 and fit other convention.
@brandur
Copy link
Member

brandur commented Mar 25, 2023

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 this pull request may close these issues.

3 participants