MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / marshal

Function marshal

internal/nodeagent/dispatch.go:200–209  ·  view source on GitHub ↗
(v any)

Source from the content-addressed store, hash-verified

198}
199
200func marshal(v any) (json.RawMessage, error) {
201 if v == nil {
202 return nil, nil
203 }
204 b, err := json.Marshal(v)
205 if err != nil {
206 return nil, fmt.Errorf("marshal response: %w", err)
207 }
208 return json.RawMessage(b), nil
209}
210
211// handleLogsStream 同步阻塞,把 nodeapi.LogsChannel 的每行包成
212// {"line":"..."} 通过 sender 推回 server,event="log"。

Callers 1

HandleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected