logs

package
v1.38.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

View Source
const LogSourceAttribute = "log.source"
View Source
const MultilineCollectorTimeout = time.Second

MultilineCollectorTimeout is how long the log parser waits before deciding a multi-line log message is complete.

Variables

This section is empty.

Functions

func Exporter added in v1.38.1

func Exporter() *cacommon.LogsPipeline

func Init added in v1.13.0

func Init(cfg Config, machineId, hostname, version string)

func OtelLogEmitter added in v1.13.0

func OtelLogEmitter(containerId, source string) logparser.OnMsgCallbackF

func PatternExtractionRateLimiter added in v1.35.7

func PatternExtractionRateLimiter() *rate.Limiter

func Shutdown added in v1.34.0

func Shutdown(ctx context.Context)

Types

type Config added in v1.34.0

type Config struct {
	Endpoint    *url.URL
	AuthHeaders map[string]string
	TLSConfig   *tls.Config
}

type JournaldReader

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

func NewJournaldReader

func NewJournaldReader(journalPaths ...string) (*JournaldReader, error)

func (*JournaldReader) Close

func (r *JournaldReader) Close()

func (*JournaldReader) Subscribe

func (r *JournaldReader) Subscribe(unit string, ch chan<- logparser.LogEntry) error

func (*JournaldReader) Unsubscribe

func (r *JournaldReader) Unsubscribe(unit string)

type Pipeline added in v1.34.0

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

func NewPipeline added in v1.34.0

func NewPipeline(parser *logparser.Parser, stop func()) *Pipeline

func (*Pipeline) Counters added in v1.34.0

func (p *Pipeline) Counters() []logparser.LogCounter

func (*Pipeline) Stop added in v1.34.0

func (p *Pipeline) Stop()

type TailReader

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

func NewTailReader

func NewTailReader(fileName string, ch chan<- logparser.LogEntry) (*TailReader, error)

func (*TailReader) Stop

func (r *TailReader) Stop()

Jump to

Keyboard shortcuts

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