mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-12 05:37:32 +00:00
types/logger: add key grinder stats lines to rate-limiting exemption list
Updates #1749 Co-authored-by: Brad Fitzpatrick <bradfitz@tailscale.com> Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
f116a4c44f
commit
78d4c561b5
@@ -107,6 +107,15 @@ func (lt *LogLineTracker) Check() []string {
|
||||
return notSeen
|
||||
}
|
||||
|
||||
// Reset forgets everything that it's seen.
|
||||
func (lt *LogLineTracker) Reset() {
|
||||
lt.mu.Lock()
|
||||
defer lt.mu.Unlock()
|
||||
for _, line := range lt.listenFor {
|
||||
lt.seen[line] = false
|
||||
}
|
||||
}
|
||||
|
||||
// Close closes lt. After calling Close, calls to Logf become no-ops.
|
||||
func (lt *LogLineTracker) Close() {
|
||||
lt.mu.Lock()
|
||||
|
Reference in New Issue
Block a user