Add server subnet discovery store, API, and agent policy push.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
This commit is contained in:
@@ -93,6 +93,17 @@ func (f *FleetHandler) PostSpreadToHost(w http.ResponseWriter, r *http.Request)
|
||||
lane.Lane,
|
||||
)
|
||||
|
||||
_ = (&OathLedgerBridge{DB: f.db, Hub: f.ws}).Record(
|
||||
AuthUsername(r), dbpkg.OathSpreadDiscoveredHost, seedID, "", dbpkg.OathOutcomeSuccess,
|
||||
map[string]string{"host": req.Host, "finding": req.Finding, "join_lane": lane.Lane},
|
||||
map[string]string{"host": req.Host, "finding": req.Finding},
|
||||
)
|
||||
if f.db != nil {
|
||||
if row, err := f.db.MarkSubnetDiscoverySpreadAttempted(req.Host); err == nil && row != nil && f.ws != nil {
|
||||
f.ws.BroadcastSubnetDiscoveryUpdate(*row)
|
||||
}
|
||||
}
|
||||
|
||||
writeJSON(w, map[string]interface{}{
|
||||
"ok": true,
|
||||
"host": req.Host,
|
||||
|
||||
Reference in New Issue
Block a user