context

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 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 to trigger flush operation
	MaxLogCount                 int    // the maximum log in a log group
	Topic                       string // the output topic
	ContextPresevationTolerance int
	PackFlag                    bool // whether to add config name as a tag
	// contains filtered or unexported fields
}

AggregatorContext is the default aggregator in plugin system. If there is no specific aggregator in plugin config, it will be added.

func NewAggregatorDefault

func NewAggregatorDefault() *AggregatorContext

NewAggregatorDefault 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