Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIsEmpty = errors.New("appendable is empty")
ErrIsEmpty is returned when trying to get the latest value from an empty list.
Functions ¶
This section is empty.
Types ¶
type Appendable ¶
type Appendable[T any] struct { // contains filtered or unexported fields }
Appendable is a thread-safe list that can be appended to.
func (*Appendable[T]) Append ¶
func (a *Appendable[T]) Append(value T)
Append adds a value to the list.
func (*Appendable[T]) Latest ¶
func (a *Appendable[T]) Latest() (T, error)
Latest returns the latest value in the list.
Click to show internal directories.
Click to hide internal directories.