- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for BatchConfig (0.12 sec)
-
internal/store/batch.go
// Batch represents an ordered batch type Batch[I any] struct { items []I limit uint32 store Store[I] quitCh chan struct{} sync.Mutex } // BatchConfig represents the batch config type BatchConfig[I any] struct { Limit uint32 Store Store[I] CommitTimeout time.Duration Log logger } // Add adds the item to the batch
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 2.9K bytes - Viewed (0) -
internal/store/batch_test.go
} }() store, err := setUpQueueStore(queueDir, 100) if err != nil { t.Fatalf("Failed to create a queue store; %v", err) } var limit uint32 = 100 batch := NewBatch[TestItem](BatchConfig[TestItem]{ Limit: limit, Store: store, CommitTimeout: 5 * time.Minute, Log: func(ctx context.Context, err error, id string, errKind ...interface{}) { t.Log(err) }, })
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 5.6K bytes - Viewed (0)