Skip to content

Conversation

lizard-boy
Copy link

Motivation

🚧 similar to localstack#7396, this adds an in-memory request dispatching mechanism. it has a similar but slightly different approach to organizing the runtime components into the container. just playing around.

Changes

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR introduces an in-memory request dispatching mechanism for LocalStack, focusing on improved modularity and efficient request handling.

  • Added GatewayClient class in client.py for direct request injection into the Gateway
  • Introduced RuntimeContainer class in new components.py for centralized management of core runtime components
  • Simplified serve_gateway function in edge.py to use pre-configured gateway from components.gateway
  • Modified S3 virtual host proxy handler in virtual_host.py to use the new GatewayClient for request dispatching

4 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings

self.gateway = gateway

def request(self, request: Request, server: str | None = None) -> Response:
from localstack.http.response import Response
Copy link

Choose a reason for hiding this comment

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

style: This import should be at the top of the file with other imports

"""The Gateway processes incoming HTTP request and dispatches them to AWS services or internal resources"""

service_plugin_manager: "ServicePluginManager"
"""The plugin manager """
Copy link

Choose a reason for hiding this comment

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

style: The docstring for service_plugin_manager is incomplete

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