Documentation ¶
Overview ¶
Package util provides various utility functions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Remember ¶
type Remember[T any] interface { // Get returns nil if nothing is remembered or it has expired Get() *T // Update sets the thing to be remembered Update(*T) // Forget clears the thing that was remembered Forget() }
Remember stores an item for a period of time. It is safe to share with multiple goroutines.
type UnboundedChan ¶ added in v0.5.2
type UnboundedChan[T any] interface { In() chan<- T Out() <-chan T Close() }
UnboundedChan is a channel with an unbounded buffer
func NewUnboundedChan ¶ added in v0.5.2
func NewUnboundedChan[T any](interval time.Duration) UnboundedChan[T]
NewUnboundedChan creates a new unbounded channel
Click to show internal directories.
Click to hide internal directories.