feat: add one pull plug and play feature

This commit is contained in:
2026-05-18 11:28:38 +02:00
parent ad64766cd6
commit fc498379f6
11 changed files with 290 additions and 42 deletions

View File

@ -72,6 +72,16 @@ func (h *Handler) ListAgents(w http.ResponseWriter, r *http.Request) {
jsonOK(w, out)
}
func (h *Handler) DeleteAgent(w http.ResponseWriter, r *http.Request) {
agentID := chi.URLParam(r, "agentID")
if err := h.store.DeleteAgent(agentID); err != nil {
http.Error(w, "store error", http.StatusInternalServerError)
return
}
h.registry.Deregister(agentID)
w.WriteHeader(http.StatusNoContent)
}
func (h *Handler) UpdateAgent(w http.ResponseWriter, r *http.Request) {
agentID := chi.URLParam(r, "agentID")
var body struct {