forked from krakend/krakend-ce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sd.go
23 lines (17 loc) · 695 Bytes
/
sd.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package krakend
import (
"context"
"github.com/luraproject/lura/v2/config"
"github.com/luraproject/lura/v2/logging"
"github.com/luraproject/lura/v2/sd/dnssrv"
)
// RegisterSubscriberFactories registers all the available sd adaptors
func RegisterSubscriberFactories(_ context.Context, _ config.ServiceConfig, _ logging.Logger) func(n string, p int) {
// register the dns service discovery
dnssrv.Register()
return func(name string, port int) {}
}
type registerSubscriberFactories struct{}
func (registerSubscriberFactories) Register(ctx context.Context, cfg config.ServiceConfig, logger logging.Logger) func(n string, p int) {
return RegisterSubscriberFactories(ctx, cfg, logger)
}