diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-07-28 10:11:43 +0000 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-07-29 16:31:35 +0900 |
commit | 59997e8daaf9793caecf178c770d9bb3882b148f (patch) | |
tree | 16ec6f729b9902d6711829647fbe8620d6fdd9ca /docs/sources | |
parent | f3ae68b9f28e0ddbe33be3ecf09c2015cfba6078 (diff) |
server: move default config setting logic inside BgpServer's methods
We have three ways to configure gobgp. config file, grpc api and native lib.
Every methods eventually call (*server.BgpServer).Start() or
(*server.BgpServer).AddNeighbor() when starting bgp server or adding
neighbors.
This commit moves default config setting logic inside them to remove
redundant code in grpc_server.go and simplify the usage of native lib.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'docs/sources')
-rw-r--r-- | docs/sources/lib.md | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/docs/sources/lib.md b/docs/sources/lib.md index ad1e257c..479f7d1e 100644 --- a/docs/sources/lib.md +++ b/docs/sources/lib.md @@ -40,10 +40,6 @@ func main() { }, } - if err := config.SetDefaultGlobalConfigValues(global); err != nil { - log.Fatal(err) - } - if err := s.Start(global); err != nil { log.Fatal(err) } @@ -56,10 +52,6 @@ func main() { }, } - if err := config.SetDefaultNeighborConfigValues(n, global.Config.As); err != nil { - log.Fatal(err) - } - if err := s.AddNeighbor(n); err != nil { log.Fatal(err) } |