limit

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDebounce

func NewDebounce(delay time.Duration) func(action func())

NewDebounce 函数接收一个时间间隔作为参数,返回一个新的 debounce 实例

func NewSingleFlight

func NewSingleFlight(key string) func(action func() (any, error)) (any, error)

func NewThrottle

func NewThrottle(duration time.Duration) func(action func())

NewThrottle 函数接收一个时间间隔作为参数,返回一个新的 throttle 实例

Types

This section is empty.

Jump to

Keyboard shortcuts

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