forked from open-telemetry/opentelemetry-collector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ff251a
commit c3c66ff
Showing
10 changed files
with
1,081 additions
and
796 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package exporterbatcher // import "go.opentelemetry.io/collector/exporter/exporterbatcher" | ||
|
||
// type Batcher[T any] struct { | ||
// batches batch* | ||
|
||
// flushTimeout int // TODO | ||
// flushFunc func(req T) err | ||
// } | ||
|
||
// func (b *Batcher[T]) FlushIfNecessary() error { | ||
// mu.Lock() | ||
|
||
// var batchToExport | ||
// var now = time.Now() | ||
// if now - lastFlushTime > flushTimeout || activeBatch.size() > minBatchSize { | ||
// lastFlushTime = now | ||
// batchToExport = activeBatch | ||
// activeBatch = pendingBatches[0] | ||
// pendingBatches = pendingBatches[1:] | ||
// } | ||
// qc.timer.Reset(batcher.FlushTimeout) | ||
// mu.Unlock() | ||
// flushFunc(req) | ||
// } | ||
|
||
|
||
// func (b *Batcher[T]) Push(item T) error { | ||
// if maxSize != 0 && batches[0].size() + item.size() > maxSize: | ||
// sdlfj | ||
|
||
|
||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.