docs(proxy): tighten config comments

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-04-05 03:22:57 +00:00
parent 82b2375058
commit 5680539dbb

View file

@ -1,6 +1,6 @@
package proxy package proxy
// Config is the top-level proxy configuration. // Config is the top-level proxy configuration loaded from JSON.
// //
// cfg := &proxy.Config{ // cfg := &proxy.Config{
// Mode: "nicehash", // Mode: "nicehash",
@ -76,7 +76,7 @@ type HTTPConfig struct {
Restricted bool `json:"restricted"` // true = read-only GET only Restricted bool `json:"restricted"` // true = read-only GET only
} }
// RateLimit configures per-IP connection throttling. // RateLimit caps connection attempts per source IP.
// //
// limiter := proxy.NewRateLimiter(proxy.RateLimit{ // limiter := proxy.NewRateLimiter(proxy.RateLimit{
// MaxConnectionsPerMinute: 30, // MaxConnectionsPerMinute: 30,
@ -87,7 +87,7 @@ type RateLimit struct {
BanDurationSeconds int `json:"ban-duration"` // 0 = no ban BanDurationSeconds int `json:"ban-duration"` // 0 = no ban
} }
// WorkersMode selects the login field used as the worker identity. // WorkersMode picks the login field used as the worker name.
// //
// cfg.Workers = proxy.WorkersByRigID // cfg.Workers = proxy.WorkersByRigID
type WorkersMode string type WorkersMode string