From 59997e8daaf9793caecf178c770d9bb3882b148f Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Thu, 28 Jul 2016 10:11:43 +0000 Subject: 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 --- docs/sources/lib.md | 8 -------- 1 file changed, 8 deletions(-) (limited to 'docs/sources/lib.md') 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) } -- cgit v1.2.3