throttle

package
v0.0.0-...-a06e19b Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Throttle

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

func New

func New(delay time.Duration) *Throttle

func (*Throttle) IsActivated

func (d *Throttle) IsActivated() bool

NOTE: You cannot have native throttling behaviour with builtin ticker but you can check if that trigger event really should be used

func (*Throttle) Stop

func (d *Throttle) Stop()

func (*Throttle) Touch

func (d *Throttle) Touch()

func (*Throttle) Triggered

func (d *Throttle) Triggered() <-chan time.Time

Jump to

Keyboard shortcuts

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