debouncer

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: MIT Imports: 2 Imported by: 5

README

debouncer

Golang Debouncer

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Debouncer

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

Debouncer - A debouncer for ensuring that only one event fires when

multiple triggers happen inside a defined window of time

func New

func New(limit time.Duration, callback func()) *Debouncer

New - Returns a new debouncer with the defined delay and callback

func (*Debouncer) Trigger

func (g *Debouncer) Trigger()

Trigger - Calls the callback after duration of the last calling of trigger

Jump to

Keyboard shortcuts

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