Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for NewBatch (0.09 sec)

  1. 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)
  2. 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)
  3. 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)
  4. CHANGELOG/CHANGELOG-1.16.md

    - Fixes a bug that when there is a "connection refused" error, the reflector's ListAndWatch func will return directly but what expected is that sleep 1 second and rewatch since the specified resourceVersion.
      ([#81634](https://github.com/kubernetes/kubernetes/pull/81634), [@likakuli](https://github.com/likakuli))
    Registered: Fri Nov 01 09:05:11 UTC 2024
    - Last Modified: Thu Feb 11 10:00:57 UTC 2021
    - 345.2K bytes
    - Viewed (0)
Back to top