ExampleUpdateConfig shows how InitialConfig can be used without UpdateConfig
()
| 11 | |
| 12 | // ExampleUpdateConfig shows how InitialConfig can be used without UpdateConfig |
| 13 | func ExampleInitialConfig() { |
| 14 | bgpServer := server.NewBgpServer() |
| 15 | go bgpServer.Serve() |
| 16 | |
| 17 | initialConfig, err := ReadConfigFile("gobgp.conf", "toml") |
| 18 | if err != nil { |
| 19 | // Handle error |
| 20 | return |
| 21 | } |
| 22 | |
| 23 | isGracefulRestart := true |
| 24 | _, err = InitialConfig(context.Background(), bgpServer, initialConfig, isGracefulRestart) |
| 25 | if err != nil { |
| 26 | // Handle error |
| 27 | return |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | // ExampleUpdateConfig shows how UpdateConfig is used in conjunction with |
| 32 | // InitialConfig. |
nothing calls this directly
no test coverage detected
searching dependent graphs…