Comments (3)
We have a case where we support updating the configuration of the server, when the reconfiguration occurs we need to recreate all the services as even the di.Options can change in the child container.
Right now we are pulling objects out of the parent Container and manually putting it in the new child container. It works, but it's not beautiful.
from di.
Hi, @chirino 👋 Thanks for your interest!
I have heard about scopes in DI containers and seen several implementations. But in my practice, I have not encountered a real need to separate components into several containers, especially in Go applications, which are primarily small. I think that scopes are necessary for large codebases with many modules, which components must be isolated from each other.
Maybe you have a real-life example where this functionality would be helpful? We could discuss it :)
from di.
@chirino Functional released. Thanks a lot!
https://github.com/goava/di/releases/tag/v1.10.0
from di.
Related Issues (20)
- Unable to make interfaces group by using the same funtion interface implenentations HOT 11
- container.Resolve() doesn't create signleton when dependency requested via intermidiate constructor HOT 2
- No documentation for the *Container.Has() method HOT 1
- Using `di.WithName()` breaks when having one entry without a `di.Name()` HOT 7
- Parameter structs need an empty di tag on an entry else it gets ignored HOT 1
- Allow decorating of services in the container HOT 8
- concurrent map read and map write HOT 6
- Duplicate instance with di.As HOT 2
- Singleton HOT 1
- Handle embed unnamed dependency HOT 1
- Improve tracing HOT 2
- Change how Injected structs are tagged HOT 4
- Why should I pass a pointer to the type? HOT 2
- Possibility to disable singleton behavior. HOT 5
- Important: Upcoming Transfer of This Repository on June 5th
- Issue after package name migration HOT 4
- Provide values via custom string types HOT 2
- Overriding a value from a parent di container
- Factory function returning other di.Provide HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from di.