logstorerouter

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxLogCount     = 1024
	MaxLogGroupSize = 3 * 1024 * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatorRouter

type AggregatorRouter struct {
	MaxLogGroupCount int
	MaxLogCount      int
	PackFlag         bool
	Topic            string
	DropDisMatch     bool
	SourceKey        string
	NoMatchError     bool
	RouterRegex      []string
	RouterLogstore   []string

	Lock *sync.Mutex
	// contains filtered or unexported fields
}

func NewAggregatorRouter

func NewAggregatorRouter() *AggregatorRouter

func (*AggregatorRouter) Add

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

Add adds @log to aggregator. If @log has a key equal to aggregator.SourceKey (or SourceKey is empty), it passes @log to matched sub aggregator by calling route function. If @log don't have specified key but aggregator.DropDisMatch is not set, it passed @log to default aggregator, otherwise, it returns error when aggregator.NoMatchError is set. Add returns any error encountered, nil means success.

func (*AggregatorRouter) Description

func (*AggregatorRouter) Description() string

func (*AggregatorRouter) Flush

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

func (*AggregatorRouter) Init

func (p *AggregatorRouter) Init(context pipeline.Context, que pipeline.LogGroupQueue) (int, error)

func (*AggregatorRouter) Reset

func (p *AggregatorRouter) Reset()

type SubAgg

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

SubAgg uses reg to decide if a log belongs to it or not. Logs are added to agg and will be send to logstore.

Jump to

Keyboard shortcuts

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