summaryrefslogtreecommitdiffhomepage
path: root/gobgpd
diff options
context:
space:
mode:
Diffstat (limited to 'gobgpd')
-rw-r--r--gobgpd/main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/gobgpd/main.go b/gobgpd/main.go
index e8f15f10..99a1c95c 100644
--- a/gobgpd/main.go
+++ b/gobgpd/main.go
@@ -202,7 +202,11 @@ func main() {
}
if len(newConfig.Collector.Config.Url) > 0 {
- if err := bgpServer.StartCollector(&newConfig.Collector.Config); err != nil {
+ if _, err := apiServer.AddCollector(context.Background(), &api.AddCollectorRequest{
+ Url: c.Collector.Config.Url,
+ DbName: c.Collector.Config.DbName,
+ TableDumpInterval: c.Collector.Config.TableDumpInterval,
+ }); err != nil {
log.Fatalf("failed to set collector config: %s", err)
}
}