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

Method Stop

pkg/server/server.go:214–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

212}
213
214func (s *BgpServer) Stop() {
215 if err := s.StopBgp(context.Background(), &api.StopBgpRequest{}); err != nil {
216 s.logger.Error("failed to stop BGP server",
217 slog.String("Topic", "BgpServer"),
218 slog.Any("Error", err),
219 )
220 }
221
222 if s.bfdServer != nil {
223 s.bfdServer.Stop()
224 }
225
226 if s.apiServer != nil {
227 s.apiServer.grpcServer.Stop()
228 }
229}
230
231func (s *BgpServer) listListeners(addr string) []*net.TCPListener {
232 list := make([]*net.TCPListener, 0, len(s.listeners))

Callers 5

Test_BgpAddDeletePeerFunction · 0.95
TestGRPCWatchEventFunction · 0.95

Calls 4

StopBgpMethod · 0.95
ErrorMethod · 0.80
StringMethod · 0.65
StopMethod · 0.45

Tested by 5

Test_BgpAddDeletePeerFunction · 0.76
TestGRPCWatchEventFunction · 0.76