diff options
author | Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp> | 2014-12-22 02:56:17 -0800 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-12-22 02:56:17 -0800 |
commit | d2bbac0697bfdbf6395172163cd0d171bb196246 (patch) | |
tree | 388c8debe0b0f77e84dd0f07f1bfb2a718d14e82 /bgpd.go | |
parent | 275f20e96e674e3a0b654292f81240744c61665a (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.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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 { |