MCPcopy
hub / github.com/osrg/gobgp / ExampleInitialConfig

Function ExampleInitialConfig

pkg/config/config_test.go:13–29  ·  view source on GitHub ↗

ExampleUpdateConfig shows how InitialConfig can be used without UpdateConfig

()

Source from the content-addressed store, hash-verified

11
12// ExampleUpdateConfig shows how InitialConfig can be used without UpdateConfig
13func 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.

Callers

nothing calls this directly

Calls 4

ServeMethod · 0.95
NewBgpServerFunction · 0.92
ReadConfigFileFunction · 0.85
InitialConfigFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…