-
Notifications
You must be signed in to change notification settings - Fork 932
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
Solving Circular Dependency in Dubbo-Go #2565
Comments
There're some terms that I cannot understand well,
For this solution, could you please give a simple example of maybe how it solves the specific issue in #2539? |
Why is this needed:
This issue was brought up by #2539. Although the export logic of the server layer was separated, the generated triple files still depend on the server layer. This means that our internal service module still depends on the server layer, and our underlying modules depend on these internal services. As the server layer is an upper-level module, it depends on these lower-level modules, resulting in a circular dependency.
What would you like to be added:
However, the underlying modules typically only use a few interfaces of the internal services, and the number of internal services is not large. It is not necessary to depend on all packages of the internal services. One possible solution is to create an "internal" package as the top-level module, where the service methods are defined. Then, the internal services can still be registered through the server layer, and the methods can be further registered in the
internal
package. This way, other modules do not need to directly depend on the internal services.Refer to grpc-go to resolve circular dependencies
The text was updated successfully, but these errors were encountered: