Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ThrottledLogger ¶
type ThrottledLogger struct {
// contains filtered or unexported fields
}
ThrottledLogger limits the number of log calls during a time window. To create a new logger use NewThrottled.
func NewThrottled ¶
func NewThrottled(n int, d time.Duration) *ThrottledLogger
NewThrottled returns a new throttled logger. The returned logger will allow up to n calls in a time period of length d.
func (*ThrottledLogger) Error ¶
func (tl *ThrottledLogger) Error(format string, params ...interface{})
Error logs the message at the error level.
func (*ThrottledLogger) Warn ¶
func (tl *ThrottledLogger) Warn(format string, params ...interface{})
Warn logs the message at the warning level.
Click to show internal directories.
Click to hide internal directories.