summaryrefslogtreecommitdiffhomepage
path: root/bgpd.go
diff options
context:
space:
mode:
authorHiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>2014-12-22 02:56:17 -0800
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-12-22 02:56:17 -0800
commitd2bbac0697bfdbf6395172163cd0d171bb196246 (patch)
tree388c8debe0b0f77e84dd0f07f1bfb2a718d14e82 /bgpd.go
parent275f20e96e674e3a0b654292f81240744c61665a (diff)
Add rest API support
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'bgpd.go')
-rw-r--r--bgpd.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/bgpd.go b/bgpd.go
index 277349a7..1ba04fbc 100644
--- a/bgpd.go
+++ b/bgpd.go
@@ -18,6 +18,7 @@ package main
import (
"fmt"
"github.com/jessevdk/go-flags"
+ "github.com/osrg/gobgp/api"
"github.com/osrg/gobgp/config"
"github.com/osrg/gobgp/packet"
"github.com/osrg/gobgp/server"
@@ -54,6 +55,10 @@ func main() {
bgpServer := server.NewBgpServer(bgp.BGP_PORT)
go bgpServer.Serve()
+ // start Rest Server
+ restServer := api.NewRestServer(api.REST_PORT, bgpServer.RestReqCh)
+ go restServer.Serve()
+
var bgpConfig *config.BgpType = nil
for {
select {