Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PushNoBlock ¶ added in v0.13.1
Types ¶
type OverrideChannel ¶ added in v0.13.1
type OverrideChannel[T any] interface { io.Closer Receive(ctx context.Context) (T, error) // Ch() chan T // Update the latest value WriteLast(value T) }
OverrideChannel is a type of channel that only keeps the latest value, the write operation never blocks.
func NewOverrideChannel ¶ added in v0.13.1
func NewOverrideChannel[T any]() OverrideChannel[T]
Click to show internal directories.
Click to hide internal directories.