time_queue

package
v0.0.0-...-d2f97bb Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item[T any] struct {
	Time  time.Time
	Value T
}

type Queue

type Queue[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any]() *Queue[T]

func (*Queue[T]) Dispatch

func (q *Queue[T]) Dispatch(ctx context.Context) iter.Seq[Item[T]]

func (*Queue[T]) Flush

func (q *Queue[T]) Flush(now time.Time) iter.Seq[Item[T]]

func (*Queue[T]) Schedule

func (q *Queue[T]) Schedule(item Item[T]) (dispatchUpdater func(updater func(Item[T]) Item[T]))

Jump to

Keyboard shortcuts

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