higress
higress copied to clipboard
Add Custom Discoverer interface
Why do you need it?
Is your feature request related to a problem? Please describe in details
Design the Discoverer interface, with target group
type Discoverer interface {
Run(ctx context.Context, up chan<- []*targetgroup.Group)
}
target group
may be link:
[]targetgroup.Group{
{
Targets: []model.LabelSet{
{
"__instance__": "10.11.150.1:7870",
"hostname": "demo-target-1",
"protocol": ["http", "dubbo", "grpc"],
},
{
"__instance__": "10.11.150.4:7870",
"hostname": "demo-target-2",
},
},
Labels: model.LabelSet{
"job": "mysql",
},
},
....
How could it be?
A clear and concise description of what you want to happen. You can explain more about input of the feature, and output of it.
Users can add custom registration centers through standard interfaces.
like: xds
and http watch
model
Other related information
Add any other context or screenshots about the feature request here.
/cc @johnlanni
In fact, there is no need to design a new general mechanism. You can directly use istio's MCP specification. You can refer to Nacos' MCP server implementation. Higress can also support service discovery in this way.
https://nacos.io/zh-cn/blog/pilot%20mcp.html
In fact, there is no need to design a new general mechanism. You can directly use istio's MCP specification. You can refer to Nacos' MCP server implementation. Higress can also support service discovery in this way.
https://nacos.io/zh-cn/blog/pilot%20mcp.html
Support mcp v1alpha1 interface? https://github.com/istio/api/tree/master/mcp/v1alpha1
@dongjiang1989 Yes, you can see the nacos code here: https://github.com/alibaba/nacos/blob/a7d1c35f85362a4538e81a721ab94b6bceeb714e/istio/src/main/java/com/alibaba/nacos/istio/mcp/NacosMcpService.java