MCPcopy
hub / github.com/netbirdio/netbird / toggleRoute

Method toggleRoute

client/android/route_command.go:45–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43}
44
45func (s selectRouteCommand) toggleRoute() error {
46 routeSelector := s.manager.GetRouteSelector()
47 if routeSelector == nil {
48 return fmt.Errorf("no route selector available")
49 }
50
51 routeOperation := func(routes []route.NetID, allRoutes []route.NetID) error {
52 return routeSelector.SelectRoutes(routes, true, allRoutes)
53 }
54
55 return executeRouteToggle(s.route, s.manager, "selecting route", routeOperation)
56}
57
58type deselectRouteCommand struct {
59 route string

Callers

nothing calls this directly

Calls 4

executeRouteToggleFunction · 0.85
ErrorfMethod · 0.80
SelectRoutesMethod · 0.80
GetRouteSelectorMethod · 0.65

Tested by

no test coverage detected