context

package
v1.8.8 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxLogCount        = 1024
	MaxLogGroupSize    = 3 * 1024 * 1024
	SmallPackIDTimeout = time.Duration(24*30) * time.Hour
	BigPackIDTimeout   = time.Duration(24) * time.Hour
	PackIDMapLenThresh = 100000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatorContext

type AggregatorContext struct {
	MaxLogGroupCount                 int    // the maximum log group count per source to trigger flush operation
	MaxLogCount                      int    // the maximum log in a log group
	Topic                            string // the output topic
	ContextPreservationToleranceSize int    // the maximum number of log source per config where logGroupPoolMap will not be cleared periodically
	PackFlag                         bool   // whether to add __pack_id__ as a tag
	// contains filtered or unexported fields
}

func NewAggregatorContext added in v1.2.0

func NewAggregatorContext() *AggregatorContext

NewAggregatorContext create a default aggregator with default value.

func (*AggregatorContext) Add

func (p *AggregatorContext) Add(log *protocol.Log, ctx map[string]interface{}) error

Add adds @log with @ctx to aggregator.

func (*AggregatorContext) Description

func (*AggregatorContext) Description() string

func (*AggregatorContext) Flush

func (p *AggregatorContext) Flush() []*protocol.LogGroup

Flush ...

func (*AggregatorContext) Init

Init method would be trigger before working. 1. context store the metadata of this Logstore config 2. que is a transfer channel for flushing LogGroup when reaches the maximum in the cache.

func (*AggregatorContext) Reset

func (p *AggregatorContext) Reset()

Reset ...

type LogPackSeqInfo

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

Jump to

Keyboard shortcuts

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