dubbo-go
dubbo-go copied to clipboard
Add reflection service support for triple protocol
The following snippet has been removed from ProviderConfig and needs to be supported in the new triple implementation.
for k, v := range rc.Protocols {
if v.Name == tripleConstant.TRIPLE {
// Auto create grpc based health check service.
//healthService := NewServiceConfigBuilder().
// SetProtocolIDs(k).
// SetNotRegister(true).
// SetInterface(constant.HealthCheckServiceInterface).
// Build()
//if err := healthService.Init(rc); err != nil {
// return err
//}
//c.Services[constant.HealthCheckServiceTypeName] = healthService
// Auto create reflection service configure only when provider with triple service is configured.
tripleReflectionService := NewServiceConfigBuilder().
SetProtocolIDs(k).
SetNotRegister(true).
SetInterface(constant.ReflectionServiceInterface).
Build()
if err := tripleReflectionService.Init(rc); err != nil {
return err
}
// Maybe only register once, If setting this service, break from traversing Protocols.
c.Services[constant.ReflectionServiceTypeName] = tripleReflectionService
break
}
}
plz assign this issue to me,I will implement it soon