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

Any plans to support child or cloned containers? #49

Open
GrantOllis opened this issue Mar 9, 2023 · 0 comments
Open

Any plans to support child or cloned containers? #49

GrantOllis opened this issue Mar 9, 2023 · 0 comments

Comments

@GrantOllis
Copy link

A feature that would be extremely useful would be extremely useful would be to support the creation of child or cloned containers. A child container is more complex, being an empty container with a reference to a parent container and walking up the hierarchy as it tries to resolve types, but a clone would just duplicate existing bindings at the point it was cloned and then set itself as the Container object binding in place of the original container.

The use case for this is to allow for a "scoped" container to be created. For example when handling a HTTP request objects like a context.Context generated by a HTTP request, as well as the Request and ResponseWriter could be populated to a child/clone container while handling the request and then the Call method could be used to populate required Classes for a handler method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant