Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemoryQueueCacheOverlay ¶
type InMemoryQueueCacheOverlay[T any] struct { // contains filtered or unexported fields }
InMemoryQueueCacheOverlay offers an in-memory queue that gets re-populated whenever it runs out of items
func New ¶
func New[T any](maxSize int, refillFunc func(count int) ([]T, error)) *InMemoryQueueCacheOverlay[T]
New creates a new InMemoryQueueCacheOverlay
func (*InMemoryQueueCacheOverlay[T]) Count ¶
func (i *InMemoryQueueCacheOverlay[T]) Count() int
Count returns the number of cached items
func (*InMemoryQueueCacheOverlay[T]) Fetch ¶
func (i *InMemoryQueueCacheOverlay[T]) Fetch(requestedCount int) ([]T, error)
Fetch items (will re-populate if necessary)
type MessagesDroppedError ¶
type MessagesDroppedError struct {
MessagesDropped int
}
MessagesDroppedError is the Error to be returned when messages fail to be added to the queue.
func (*MessagesDroppedError) Error ¶
func (e *MessagesDroppedError) Error() string
type RefillError ¶
type RefillError struct {
OriginalPanic interface{}
}
RefillError struct to be returned when the refill function panics
func (*RefillError) Error ¶
func (e *RefillError) Error() string
Click to show internal directories.
Click to hide internal directories.