cooldownqueue

package
v0.2.205 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CooldownQueue

type CooldownQueue struct {

	// public channel for reading events
	ResultChan <-chan watch.Event
	// contains filtered or unexported fields
}

CooldownQueue is a queue that lets clients put events into it with a cooldown

When a client puts an event into a queue, it waits for a cooldown period before the event is forwarded to the consumer. If and event for the same key is put into the queue again before the cooldown period is over, the event is overridden and the cooldown period is reset.

func NewCooldownQueue

func NewCooldownQueue() *CooldownQueue

NewCooldownQueue returns a new Cooldown Queue

func (*CooldownQueue) Closed

func (q *CooldownQueue) Closed() bool

func (*CooldownQueue) Enqueue

func (q *CooldownQueue) Enqueue(e watch.Event)

Enqueue enqueues an event in the Cooldown Queue

func (*CooldownQueue) Stop

func (q *CooldownQueue) Stop()

Jump to

Keyboard shortcuts

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