- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for NewBatch (0.06 sec)
-
internal/store/batch.go
func (b *Batch[I]) Close() error { defer func() { close(b.quitCh) }() b.Lock() defer b.Unlock() return b.commit() } // NewBatch creates a new batch func NewBatch[I any](config BatchConfig[I]) *Batch[I] { if config.CommitTimeout == 0 { config.CommitTimeout = defaultCommitTimeout } quitCh := make(chan struct{}) batch := &Batch[I]{
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) -
internal/event/target/kafka.go
args: args, 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 13.6K bytes - Viewed (0)