built-in agent

This commit is contained in:
Henry Dollman
2024-10-07 18:58:57 -04:00
parent 7a82571921
commit 8de2dee4e9
5 changed files with 80 additions and 33 deletions

View File

@@ -24,7 +24,7 @@ func (a *Agent) startServer(pubKey []byte, addr string) {
}
func (a *Agent) handleSession(s sshServer.Session) {
stats := a.gatherStats()
stats := a.GatherStats()
slog.Debug("Sending stats", "data", stats)
if err := json.NewEncoder(s).Encode(stats); err != nil {
slog.Error("Error encoding stats", "err", err)