Skip to content

Expose context to middleware - #1

Open
nyergler wants to merge 4 commits into
masterfrom
middleware-context
Open

Expose context to middleware#1
nyergler wants to merge 4 commits into
masterfrom
middleware-context

Conversation

@nyergler

Copy link
Copy Markdown
Member

A recent upstream change bumped Work to go-redis/v8, which uses a
context everywhere. Despite this, the context wasn't available to the
middleware, which meant we couldn't pass execution-specific
information to the actual handler.

This commit effectively moves everything from HandlerFunc to
ContextHandlerFunc, passing the context to the middleware and
underlying operations.


Note that this is a prerequisite for polytomic/app#816.

This allows Redis to route our execution to the correct node when
running in a Redis Cluster.
A recent upstream change bumped Work to go-redis/v8, which uses a
context everywhere. Despite this, the context wasn't available to the
middleware, which meant we couldn't pass execution-specific
information to the actual handler.
This commit effectively moves everything from HandlerFunc to
ContextHandlerFunc, passing the context to the middleware and
underlying operations.
@nyergler
nyergler requested a review from jpalawagaJuly 8, 2021 22:24

@jpalawagajpalawaga left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, hah.

@jpalawaga
jpalawagaforce-pushed the master branch 2 times, most recently from f35f7cc to 414947aCompareNovember 10, 2022 16:47
Sign up for freeto 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.

2 participants

@nyergler@jpalawaga