summaryrefslogtreecommitdiffhomepage
path: root/gobgpd
diff options
context:
space:
mode:
authorSatoshi Fujimoto <satoshi.fujimoto7@gmail.com>2018-06-05 15:24:27 +0900
committerSatoshi Fujimoto <satoshi.fujimoto7@gmail.com>2018-06-13 13:57:14 +0900
commit57f103ef345deb493f085525ed1674fe18c1dc0e (patch)
treec36ca0a23940c06e682a188b46ca28593793e84d /gobgpd
parent000589f3cfa62d1cc62a84e3ce3723fc5b306144 (diff)
api: Implement AddCollector()
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
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)
}
}