Add etcd as a service discovery mechanism

This commit is contained in:
skiffer-git
2024-05-11 15:40:17 +08:00
parent add7ea8ef0
commit e94598f5c1
32 changed files with 161 additions and 108 deletions
+2 -1
View File
@@ -63,6 +63,7 @@ type Config struct {
ZookeeperConfig config.ZooKeeper
Share config.Share
WebhooksConfig config.Webhooks
Discovery config.Discovery
}
func Start(ctx context.Context, index int, config *Config) error {
@@ -76,7 +77,7 @@ func Start(ctx context.Context, index int, config *Config) error {
if err != nil {
return err
}
client, err := kdisc.NewDiscoveryRegister(&config.ZookeeperConfig, &config.Share)
client, err := kdisc.NewDiscoveryRegister(&config.Discovery, &config.Share)
if err != nil {
return err
}