mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-29 21:45:21 -05:00
simplify dependency resolution
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
"v2ray.com/core"
|
||||
"v2ray.com/core/common"
|
||||
"v2ray.com/core/features"
|
||||
"v2ray.com/core/features/inbound"
|
||||
"v2ray.com/core/features/outbound"
|
||||
"v2ray.com/core/proxy"
|
||||
@@ -132,9 +131,9 @@ func (s *service) Register(server *grpc.Server) {
|
||||
hs := &handlerServer{
|
||||
s: s.v,
|
||||
}
|
||||
s.v.RequireFeatures([]interface{}{inbound.ManagerType(), outbound.ManagerType()}, func(fs []features.Feature) {
|
||||
hs.ihm = fs[0].(inbound.Manager)
|
||||
hs.ohm = fs[1].(outbound.Manager)
|
||||
s.v.RequireFeatures(func(im inbound.Manager, om outbound.Manager) {
|
||||
hs.ihm = im
|
||||
hs.ohm = om
|
||||
})
|
||||
RegisterHandlerServiceServer(server, hs)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user