feat: add proxy and statistics features
This commit is contained in:
@ -156,6 +156,14 @@ func (g *Gateway) Tunnel(stream agentv1.AgentGateway_TunnelServer) error {
|
||||
case *agentv1.AgentMessage_FileResult:
|
||||
g.registry.ResolvePending(agentID, p.FileResult.CommandId, p.FileResult)
|
||||
|
||||
case *agentv1.AgentMessage_StatsSnapshot:
|
||||
g.registry.UpdateStats(agentID, p.StatsSnapshot)
|
||||
g.broker.Publish(broker.Event{
|
||||
Type: "stats.updated",
|
||||
AgentID: agentID,
|
||||
Payload: p.StatsSnapshot,
|
||||
})
|
||||
|
||||
case *agentv1.AgentMessage_UpdateCheckResult:
|
||||
res := p.UpdateCheckResult
|
||||
if res.Error != "" {
|
||||
|
||||
Reference in New Issue
Block a user