package throttle

import "github.com/moby/buildkit/util/throttle"

Index

Functions

func Throttle

func Throttle(d time.Duration, f func()) func()

Throttle wraps a function so that internal function does not get called more frequently than the specified duration.

func ThrottleAfter

func ThrottleAfter(d time.Duration, f func()) func()

ThrottleAfter wraps a function so that internal function does not get called more frequently than the specified duration. The delay is added after function has been called.

Source Files

throttle.go

Version
v0.7.0-rc1
Published
Mar 12, 2020
Platform
js/wasm
Imports
2 packages
Last checked
1 minute ago

Tools for package owners.