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

Method ReadStatus

e2e/harness.go:215–225  ·  view source on GitHub ↗
(nodeName string)

Source from the content-addressed store, hash-verified

213}
214
215func (h *Harness) ReadStatus(nodeName string) (*protocol.StatusResponse, error) {
216 stdout, _, err := h.Exec(nodeName, []string{"nylon", "status", "-i", "nylon0", "--json"})
217 if err != nil {
218 return nil, err
219 }
220 resp := &protocol.IpcResponse{}
221 if err := protojson.Unmarshal([]byte(stdout), resp); err != nil {
222 return nil, err
223 }
224 return resp.GetStatus(), nil
225}
226
227func HasSelectedRoute(status *protocol.StatusResponse, prefix, nh, router string) bool {
228 for _, route := range status.GetRoutes().GetSelected() {

Callers 3

WaitForStatusMethod · 0.95
TestEndpointResolutionFunction · 0.95
TestDynamicResolutionFunction · 0.95

Calls 2

ExecMethod · 0.95
GetStatusMethod · 0.95

Tested by 2

TestEndpointResolutionFunction · 0.76
TestDynamicResolutionFunction · 0.76