mirror of
https://github.com/0x1d/rcond.git
synced 2025-12-14 18:25:21 +01:00
docs: describe cluster events
This commit is contained in:
@@ -304,6 +304,10 @@ func HandleClusterMembers(w http.ResponseWriter, r *http.Request, agent *cluster
|
||||
}
|
||||
|
||||
func HandleClusterEvent(w http.ResponseWriter, r *http.Request, agent *cluster.Agent) {
|
||||
if agent == nil {
|
||||
writeError(w, "cluster agent is not initialized", http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
var req clusterEventRequest
|
||||
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
|
||||
writeError(w, err.Error(), http.StatusBadRequest)
|
||||
|
||||
Reference in New Issue
Block a user