CI / Docker image (build and smoke test) (push) Skipped
CI / Format and vet (push) Successful in 24s
CI / Tests (Linux, race detector) (push) Successful in 34s
CI / Dependency audit (push) Successful in 14s
Release / Plan (reuse the published image?) (push) Successful in 3s
Release / ci (push) Skipped
Release / Build image (amd64) (push) Skipped
Release / Build image (arm64) (push) Skipped
Release / Publish tags (push) Successful in 13s
Release / Gitea release (push) Successful in 4s
Peer events and summary rows are rebuilt from validated fields (address, country code, category) and the forged/unban flags from peers are ignored. The live relay drops a peer that exceeds about 1 MB/s, also within a single window. --peer-blocklist=off keeps the hub's blocklist to local observations. UI polish: plural forms, blocklist preview and downloads follow the active slice, compact IP cards on phones. Docs for the 1.1.0 interface. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
14 lines
573 B
Go
14 lines
573 B
Go
package fed
|
|
|
|
import "time"
|
|
|
|
// SetLiveLimits shrinks the flood window, the byte ceiling and the first backoff; it returns the restore func.
|
|
func SetLiveLimits(window time.Duration, bytesPerSec int, backoff time.Duration) func() {
|
|
w, b, k := liveByteWindow, maxLiveBytes, liveBackoff0
|
|
liveByteWindow, maxLiveBytes, liveBackoff0 = window, bytesPerSec, backoff
|
|
return func() { liveByteWindow, maxLiveBytes, liveBackoff0 = w, b, k }
|
|
}
|
|
|
|
// WaitStream blocks until the live stream goroutines have returned (after ctx is cancelled).
|
|
func (h *Hub) WaitStream() { h.swg.Wait() }
|