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

Function NewServer

pkg/a2a/server.go:28–37  ·  view source on GitHub ↗

NewServer 创建 A2A 服务器

(actorSystem *actor.System, taskStore TaskStore)

Source from the content-addressed store, hash-verified

26
27// NewServer 创建 A2A 服务器
28func NewServer(actorSystem *actor.System, taskStore TaskStore) *Server {
29 if taskStore == nil {
30 taskStore = NewInMemoryTaskStore()
31 }
32
33 return &Server{
34 actorSystem: actorSystem,
35 taskStore: taskStore,
36 }
37}
38
39// HandleRequest 处理 JSON-RPC 请求
40func (s *Server) HandleRequest(ctx context.Context, agentID string, req *JSONRPCRequest) *JSONRPCResponse {

Calls 1

NewInMemoryTaskStoreFunction · 0.85