Help us shape the future of Go! Take the 2026 Go Developer Survey

throttledlogger

package
v1.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: MPL-2.0 Imports: 2 Imported by: 0

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 is a logger that throttles the output, i.e. it only logs a message if a certain amount of time has passed since the last log message.

func NewThrottledLogger

func NewThrottledLogger(throttlingInterval time.Duration) *ThrottledLogger

func (*ThrottledLogger) Debugf

func (t *ThrottledLogger) Debugf(format string, args ...any)

func (*ThrottledLogger) Infof

func (t *ThrottledLogger) Infof(format string, args ...any)

type Timer

type Timer struct {
	// contains filtered or unexported fields
}

func NewTimer

func NewTimer(tickInterval time.Duration) *Timer

func (*Timer) IntervalPassed

func (t *Timer) IntervalPassed(now time.Time) bool

func (*Timer) Tick

func (t *Timer) Tick(now time.Time)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL