MCPcopy Create free account
hub / github.com/encodeous/nylon / HasSelectedRoute

Function HasSelectedRoute

e2e/harness.go:227–235  ·  view source on GitHub ↗
(status *protocol.StatusResponse, prefix, nh, router string)

Source from the content-addressed store, hash-verified

225}
226
227func HasSelectedRoute(status *protocol.StatusResponse, prefix, nh, router string) bool {
228 for _, route := range status.GetRoutes().GetSelected() {
229 source := route.GetPubRoute().GetSource()
230 if source.GetPrefix() == prefix && route.GetNh() == nh && source.GetNodeId() == router {
231 return true
232 }
233 }
234 return false
235}
236
237func HasResolvedEndpoint(status *protocol.StatusResponse, address, resolved string) bool {
238 for _, neigh := range status.GetNeighbours() {

Callers 2

TestHealthcheckPingFunction · 0.85
TestHealthcheckHTTPFunction · 0.85

Calls 7

GetSelectedMethod · 0.80
GetPrefixMethod · 0.65
GetRoutesMethod · 0.45
GetSourceMethod · 0.45
GetPubRouteMethod · 0.45
GetNhMethod · 0.45
GetNodeIdMethod · 0.45

Tested by 2

TestHealthcheckPingFunction · 0.68
TestHealthcheckHTTPFunction · 0.68