higress-group/higress

Add Custom Discoverer interface

Open

#767 opened on Jan 9, 2024

 (6 comments) (0 reactions) (0 assignees)Go (1,219 forks)github user discovery
good first issue

Repository metrics

Stars
 (9,036 stars)
PR merge metrics
 (Avg merge 7d 9h) (18 merged PRs in 30d)

Description

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.

Contributor guide