higress-group/higress

Add Custom Discoverer interface

开放

#767 创建于 2024年1月9日

 (6 条评论) (0 个反应) (0 位负责人)Go (1,219 个派生)github user discovery
good first issue

仓库指标

星标
 (9,036 个星标)
PR 合并指标
 (平均合并 7天 9小时) (30 天内合并 18 个 PR)

描述

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.

贡献者指南