bucket

package
v0.0.0-...-d741f38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch []pcommon.TraceID

Batch is the type of batches held by the Batcher.

type Bucket

type Bucket struct {
	// contains filtered or unexported fields
}

0 samplePeriod cleanPeriod +———————————+————————————+ r w r - smapleBatch 缓存samplePeriod 秒后推送数据 w - cleanBatch 缓存cleanPeriod 秒后清理

func NewBucket

func NewBucket(cleanPeriod int, name string) (*Bucket, error)

func (*Bucket) CopyAndGetBatch

func (bucket *Bucket) CopyAndGetBatch(batch Batch) (toCleanBatch Batch)

同一线程执行,无需加锁

func (*Bucket) CopyAndGetBatches

func (bucket *Bucket) CopyAndGetBatches(batch Batch, sampleTime int) (sampleBatch Batch, toCleanBatch Batch)

同一线程执行,无需加锁

func (*Bucket) GetCleanPeriod

func (bucket *Bucket) GetCleanPeriod() int

type WriteableBatch

type WriteableBatch struct {
	// contains filtered or unexported fields
}

func NewWriteableBatch

func NewWriteableBatch() *WriteableBatch

func (*WriteableBatch) AddToBatch

func (batch *WriteableBatch) AddToBatch(data pcommon.TraceID)

func (*WriteableBatch) GetAndReset

func (batch *WriteableBatch) GetAndReset() Batch

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL