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

Function NewAPIDispatcher

internal/nodeagent/dispatch.go:38–40  ·  view source on GitHub ↗

NewAPIDispatcher 构造一个 dispatcher。ipsentinel 可为 nil, 此时所有 IPSentinel* method 会返回错误。

(api *nodeapi.API, ipsentinel IPSentinelHandler)

Source from the content-addressed store, hash-verified

36// NewAPIDispatcher 构造一个 dispatcher。ipsentinel 可为 nil,
37// 此时所有 IPSentinel* method 会返回错误。
38func NewAPIDispatcher(api *nodeapi.API, ipsentinel IPSentinelHandler) *APIDispatcher {
39 return &APIDispatcher{api: api, ipsentinel: ipsentinel}
40}
41
42// SetSender 由 nodeagent.session 在连接建立后调用,把 Sender 注入给 dispatcher
43// 用于流式 method 主动推帧。

Calls

no outgoing calls