MCPcopy
hub / github.com/PatchMon/PatchMon / AgentSender

Interface AgentSender

server-source-code/internal/rdpproxy/session.go:38–40  ·  view source on GitHub ↗

AgentSender is the subset of the agent registry used for writes. The registry serialises writes per-agent behind a mutex so concurrent sessions sharing the same WebSocket do not corrupt frames. Injected via NewSessions so rdpproxy stays decoupled from the concrete registry type.

Source from the content-addressed store, hash-verified

36// same WebSocket do not corrupt frames. Injected via NewSessions so rdpproxy
37// stays decoupled from the concrete registry type.
38type AgentSender interface {
39 SendJSON(apiID string, v any) error
40}
41
42// AgentResult carries the outcome of the initial agent handshake.
43// On success Connected=true. On failure Connected=false and ErrorMsg holds the

Callers 8

SendToAgentMethod · 0.65
sendToAgentMethod · 0.65
SendDisconnectMethod · 0.65
ProcessTaskMethod · 0.65
ProcessTaskMethod · 0.65
ApplyPendingConfigMethod · 0.65
handleConnectionMethod · 0.65
UpdateMethod · 0.65

Implementers 1

Registryserver-source-code/internal/agentregis

Calls

no outgoing calls

Tested by

no test coverage detected