Documentation
¶
Index ¶
- type BatchFn
- type BatchItemFn
- type Butcher
- func (b *Butcher[T]) HandleBatchesAsync(ctx context.Context, batchSize int, batchHandler BatchFn[T]) error
- func (b *Butcher[T]) HandleBatchesSync(batchSize int, batchHandler BatchFn[T]) error
- func (b *Butcher[T]) HandleItems(ctx context.Context, batchSize int, itemHandler BatchItemFn[T]) error
- func (b *Butcher[T]) Len() int
- type SyncMap
- func (m *SyncMap[K, V]) Filter(predicateFn func(k K, v V) bool) map[K]V
- func (m *SyncMap[K, V]) Len() int
- func (m *SyncMap[K, V]) Load(k K) (V, bool)
- func (m *SyncMap[K, V]) Map(mapFn func(k K, v V) V) map[K]V
- func (m *SyncMap[K, V]) Purge()
- func (m *SyncMap[K, V]) Remove(k K) bool
- func (m *SyncMap[K, V]) Store(k K, v V)
- type TimerFunc
- type TimerSet
- type Unique
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchItemFn ¶ added in v0.4.0
type Butcher ¶ added in v0.4.0
type Butcher[T any] struct { // contains filtered or unexported fields }
func NewButcher ¶ added in v0.4.0
func (*Butcher[T]) HandleBatchesAsync ¶ added in v0.4.0
func (*Butcher[T]) HandleBatchesSync ¶ added in v0.4.0
func (*Butcher[T]) HandleItems ¶ added in v0.4.0
type SyncMap ¶
type SyncMap[K comparable, V any] struct { Mu deadlock.RWMutex Data map[K]V }
func NewSyncMap ¶
func NewSyncMap[K comparable, V any](size int) *SyncMap[K, V]
type TimerFunc ¶
type TimerFunc[T comparable] func(key T) error
type TimerSet ¶
type TimerSet[T comparable] struct { // contains filtered or unexported fields }
func NewTimerSet ¶
func NewTimerSet[T comparable]() *TimerSet[T]
Click to show internal directories.
Click to hide internal directories.