debounce

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Debounce

The Debounce transform component limits the rate of message processing by introducing a delay (debounce interval) between consecutive messages.


Class Definition

class Debounce extends Transform {
  fixed sourceName = "debounce"
  interval: Duration
}

Attributes

Attribute Type Description Default Value
interval Duration The debounce interval between consecutive messages. Required

I/O Types

  • Input Type: any
  • Output Type: any

Pkl Configuration Example

Basic Debounce Transform
new Transforms.Debounce {
  name = "example-debounce"
  interval = 500.ms
}

Description

The Debounce transform component ensures that messages are processed with a minimum interval between them. This is useful for controlling the rate of message processing, reducing load, or avoiding repeated processing within a short period.

Use Cases
  1. Rate Limiting
    • Reduce the rate of messages sent to downstream components.
  2. Event Filtering
    • Prevent rapid, repeated processing of the same or similar events.

Notes

  • Configure the interval attribute based on the required debounce duration for your use case.
  • Debouncing helps in optimizing resource usage and preventing overload in downstream components.

If you have additional questions or need further clarification, feel free to reach out!

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Debounce

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

func (*Debounce) Init

func (d *Debounce) Init(cfg transform.Transform) error

func (*Debounce) Transform

func (d *Debounce) Transform(val any) any

Jump to

Keyboard shortcuts

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