MCPcopy Create free account
hub / github.com/astercloud/aster / NewSuccessResponse

Function NewSuccessResponse

pkg/a2a/types.go:254–260  ·  view source on GitHub ↗

NewSuccessResponse 创建成功响应

(id any, result any)

Source from the content-addressed store, hash-verified

252
253// NewSuccessResponse 创建成功响应
254func NewSuccessResponse(id any, result any) *JSONRPCResponse {
255 return &JSONRPCResponse{
256 JSONRPC: "2.0",
257 ID: id,
258 Result: result,
259 }
260}
261
262// NewErrorResponse 创建错误响应
263func NewErrorResponse(id any, code int, message string, data any) *JSONRPCResponse {

Callers 4

handleMessageSendMethod · 0.85
handleTasksGetMethod · 0.85
handleTasksCancelMethod · 0.85
TestJSONRPCSuccessFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestJSONRPCSuccessFunction · 0.68