docs(proxy): tighten AX-oriented comments
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
75d151b4e5
commit
031f0c0f17
2 changed files with 11 additions and 22 deletions
7
stats.go
7
stats.go
|
|
@ -6,8 +6,6 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
// Stats tracks proxy-wide counters and rolling hashrate windows.
|
||||
//
|
||||
// stats := proxy.NewStats()
|
||||
// bus.Subscribe(proxy.EventAccept, stats.OnAccept)
|
||||
// bus.Subscribe(proxy.EventReject, stats.OnReject)
|
||||
|
|
@ -29,9 +27,6 @@ type Stats struct {
|
|||
mu sync.Mutex
|
||||
}
|
||||
|
||||
// HashrateWindow60s selects the 60-second hashrate window.
|
||||
//
|
||||
// proxy.HashrateWindow60s
|
||||
const (
|
||||
HashrateWindow60s = 0 // 1 minute
|
||||
HashrateWindow600s = 1 // 10 minutes
|
||||
|
|
@ -50,8 +45,6 @@ type tickWindow struct {
|
|||
size int // window size in seconds = len(buckets)
|
||||
}
|
||||
|
||||
// StatsSummary is the serialisable snapshot returned by Stats.Summary().
|
||||
//
|
||||
// summary := proxy.NewStats().Summary()
|
||||
type StatsSummary struct {
|
||||
Accepted uint64 `json:"accepted"`
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
// Workers tracks per-worker aggregates derived from miner login fields.
|
||||
//
|
||||
// workers := proxy.NewWorkers(proxy.WorkersByRigID, bus)
|
||||
// workers.OnLogin(proxy.Event{Miner: &proxy.Miner{rigID: "rig-alpha", user: "WALLET", ip: "10.0.0.1"}})
|
||||
// _ = workers.List()
|
||||
|
|
@ -19,8 +17,6 @@ type Workers struct {
|
|||
mu sync.RWMutex
|
||||
}
|
||||
|
||||
// WorkerRecord is the aggregate row returned by `Workers.List()`.
|
||||
//
|
||||
// record := proxy.WorkerRecord{Name: "rig-alpha"}
|
||||
// _ = record.Hashrate(60)
|
||||
type WorkerRecord struct {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue