dubbo-go icon indicating copy to clipboard operation
dubbo-go copied to clipboard

Add reflection service support for triple protocol

Open chickenlj opened this issue 2 years ago • 3 comments

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
		}
	}

chickenlj avatar Nov 20 '23 09:11 chickenlj

plz assign this issue to me,I will implement it soon

FinalT avatar Nov 20 '23 10:11 FinalT

image

chickenlj avatar Nov 21 '23 01:11 chickenlj

image

chickenlj avatar Nov 21 '23 01:11 chickenlj