stdout

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerFileSyner

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

func NewDockerFileSynerByFile

func NewDockerFileSynerByFile(sds *ServiceDockerStdout, filePath string) *DockerFileSyner

type DockerJSONLog

type DockerJSONLog struct {
	LogContent string `json:"log"`
	StreamType string `json:"stream"`
	Time       string `json:"time"`
}

func (DockerJSONLog) MarshalEasyJSON

func (v DockerJSONLog) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DockerJSONLog) MarshalJSON

func (v DockerJSONLog) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DockerJSONLog) UnmarshalEasyJSON

func (v *DockerJSONLog) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DockerJSONLog) UnmarshalJSON

func (v *DockerJSONLog) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type DockerStdoutProcessor

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

func NewDockerStdoutProcessor

func NewDockerStdoutProcessor(beginLineReg *regexp.Regexp, beginLineTimeout time.Duration, beginLineCheckLength int,
	maxLogSize int, stdout bool, stderr bool, context pipeline.Context, collector pipeline.Collector,
	tags map[string]string, source string) *DockerStdoutProcessor

func (*DockerStdoutProcessor) ParseContainerLogLine added in v1.0.31

func (p *DockerStdoutProcessor) ParseContainerLogLine(line []byte) *LogMessage

func (*DockerStdoutProcessor) Process

func (p *DockerStdoutProcessor) Process(fileBlock []byte, noChangeInterval time.Duration) int

func (*DockerStdoutProcessor) StreamAllowed

func (p *DockerStdoutProcessor) StreamAllowed(log *LogMessage) bool

type LogMessage added in v1.0.31

type LogMessage struct {
	Time       string
	StreamType string
	Content    []byte
	Safe       bool
}

type ServiceDockerStdout

type ServiceDockerStdout struct {
	IncludeLabel          map[string]string `comment:"include container label for selector. [Deprecated: use IncludeContainerLabel and IncludeK8sLabel instead]"`
	ExcludeLabel          map[string]string `comment:"exclude container label for selector. [Deprecated: use ExcludeContainerLabel and ExcludeK8sLabel instead]"`
	IncludeEnv            map[string]string `` /* 249-byte string literal not displayed */
	ExcludeEnv            map[string]string `` /* 249-byte string literal not displayed */
	IncludeContainerLabel map[string]string `` /* 253-byte string literal not displayed */
	ExcludeContainerLabel map[string]string `` /* 253-byte string literal not displayed */
	IncludeK8sLabel       map[string]string `` /* 192-byte string literal not displayed */
	ExcludeK8sLabel       map[string]string `` /* 194-byte string literal not displayed */
	ExternalEnvTag        map[string]string `` /* 170-byte string literal not displayed */
	ExternalK8sLabelTag   map[string]string `` /* 180-byte string literal not displayed */
	FlushIntervalMs       int               `comment:"the interval of container discovery, and the timeunit is millisecond. Default value is 3000."`
	ReadIntervalMs        int               `comment:"the interval of read stdout log, and the timeunit is millisecond. Default value is 1000."`
	SaveCheckPointSec     int               `comment:"the interval of save checkpoint, and the timeunit is second. Default value is 60."`
	BeginLineRegex        string            `comment:"the regular expression of begin line for the multi line log."`
	BeginLineTimeoutMs    int               `comment:"the maximum timeout milliseconds for begin line match. Default value is 3000."`
	BeginLineCheckLength  int               `comment:"the prefix length of log line to match the first line. Default value is 10240."`
	MaxLogSize            int               `comment:"the maximum log size. Default value is 512*1024, a.k.a 512K."`
	CloseUnChangedSec     int               `` /* 145-byte string literal not displayed */
	StartLogMaxOffset     int64             `comment:"the first read operation would read {StartLogMaxOffset} size history logs. Default value is 128*1024, a.k.a 128K."`
	Stdout                bool              `comment:"collect stdout log. Default is true."`
	Stderr                bool              `comment:"collect stderr log. Default is true."`
	LogtailInDocker       bool              `comment:"the logtail running mode. Default is true."`
	K8sNamespaceRegex     string            `comment:"the regular expression of kubernetes namespace to match containers."`
	K8sPodRegex           string            `comment:"the regular expression of kubernetes pod to match containers."`
	K8sContainerRegex     string            `comment:"the regular expression of kubernetes container to match containers."`

	// export from ilogtail-trace component
	IncludeLabelRegex map[string]*regexp.Regexp
	ExcludeLabelRegex map[string]*regexp.Regexp
	IncludeEnvRegex   map[string]*regexp.Regexp
	ExcludeEnvRegex   map[string]*regexp.Regexp
	K8sFilter         *helper.K8SFilter

	CollectContainersFlag bool
	// contains filtered or unexported fields
}

func (*ServiceDockerStdout) ClearUselessCheckpoint

func (sds *ServiceDockerStdout) ClearUselessCheckpoint()

func (*ServiceDockerStdout) Collect

func (*ServiceDockerStdout) Description

func (sds *ServiceDockerStdout) Description() string

func (*ServiceDockerStdout) FlushAll

func (sds *ServiceDockerStdout) FlushAll(c pipeline.Collector, firstStart bool) error

func (*ServiceDockerStdout) Init

func (sds *ServiceDockerStdout) Init(context pipeline.Context) (int, error)

func (*ServiceDockerStdout) LoadCheckPoint

func (sds *ServiceDockerStdout) LoadCheckPoint()

func (*ServiceDockerStdout) SaveCheckPoint

func (sds *ServiceDockerStdout) SaveCheckPoint(force bool) error

func (*ServiceDockerStdout) Start

Start starts the ServiceInput's service, whatever that may be

func (*ServiceDockerStdout) Stop

func (sds *ServiceDockerStdout) Stop() error

Stop stops the services and closes any necessary channels and connections

Jump to

Keyboard shortcuts

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