Skip to content

Conversation

@joeshaw
Copy link
Member

@joeshaw joeshaw commented Oct 30, 2025

When fsthttp.ServeMany() is called, we now associate the options with
the context that gets passed to handlers. ServeManyOptionsFromContext()
allows handlers to retrieve those options and modify them.

A new end-to-end test demonstrates this (and allows us to test the
reusable session functionality).

One possible use case for this is for Compute applications to monitor
their heap usage, and reset ServeManyOptions.MaxRequests to 1 if it
crosses some threshold to ensure that no more requests are handled by
that session.

When fsthttp.ServeMany() is called, we now associate the options with
the context that gets passed to handlers.  ServeManyOptionsFromContext()
allows handlers to retrieve those options and modify them.

A new end-to-end test demonstrates this (and allows us to test the
reusable session functionality).

One possible use case for this is for Compute applications to monitor
their heap usage, and reset ServeManyOptions.MaxRequests to 1 if it
crosses some threshold to ensure that no more requests are handled by
that session.
@joeshaw
Copy link
Member Author

joeshaw commented Nov 7, 2025

Closing in favor of #211.

@joeshaw joeshaw closed this Nov 7, 2025
@joeshaw joeshaw deleted the joeshaw/push-vwnokykqpzpy branch November 7, 2025 20:31
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.

2 participants