( ctx context.Context, _ toolspkg.Scope, req toolspkg.CallRequest, )
| 1308 | } |
| 1309 | |
| 1310 | func (n *daemonNativeTools) networkStatus( |
| 1311 | ctx context.Context, |
| 1312 | _ toolspkg.Scope, |
| 1313 | req toolspkg.CallRequest, |
| 1314 | ) (toolspkg.ToolResult, error) { |
| 1315 | var input struct{} |
| 1316 | if err := decodeNativeInput(req, &input); err != nil { |
| 1317 | return toolspkg.ToolResult{}, err |
| 1318 | } |
| 1319 | status, err := n.deps.Network.Status(ctx) |
| 1320 | if err != nil { |
| 1321 | return toolspkg.ToolResult{}, err |
| 1322 | } |
| 1323 | payload := core.NetworkStatusPayloadFromStatus(status) |
| 1324 | if payload == nil { |
| 1325 | return toolspkg.ToolResult{}, errors.New("daemon: network status is required") |
| 1326 | } |
| 1327 | return structuredNetworkResult(map[string]any{nativeToolsNetworkKey: payload}, payload.Status) |
| 1328 | } |
| 1329 | |
| 1330 | func (n *daemonNativeTools) networkChannels( |
| 1331 | ctx context.Context, |
nothing calls this directly
no test coverage detected