- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for BatchConfig (0.07 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 Oct 27 19:28:09 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 Oct 27 19:28:09 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 5.6K bytes - Viewed (0) -
internal/event/target/kafka.go
store: queueStore, loggerOnce: loggerOnce, quitCh: make(chan struct{}), } if target.store != nil { if args.BatchSize > 1 { target.batch = store.NewBatch[event.Event](store.BatchConfig[event.Event]{ Limit: args.BatchSize, Log: loggerOnce, Store: queueStore, CommitTimeout: args.BatchCommitTimeout, }) }
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 13.6K bytes - Viewed (0)