input

package
v0.0.0-...-a257059 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToTask

func ConnectToTask(in *Input) channel.Connector

ConnectToTask 返回任务实例,用于接收采集事件 OnEvent

func RemoveInput

func RemoveInput(id string)

RemoveInput : 移除全局缓存

Types

type ContainerStdoutFields

type ContainerStdoutFields struct {
	Log    string `json:"log"`
	Stream string `json:"stream"`
	Time   string `json:"time"`
}

ContainerStdoutFields container 标准输出字段

type Input

type Input struct {
	*base.Node

	IsContainerStd    bool
	IsCRIContainerStd bool
	// contains filtered or unexported fields
}

func GetInput

func GetInput(
	taskCfg *config.TaskConfig,
	taskNode *base.TaskNode,
	beatDone chan struct{},
	states []file.State,
) (*Input, error)

func NewInput

func NewInput(
	taskCfg *config.TaskConfig,
	taskNode *base.TaskNode,
	beatDone chan struct{},
	states []file.State,
) (*Input, error)

func (*Input) Close

func (in *Input) Close() error

Close 由Filebeat在停止采集插件后调用

func (*Input) Done

func (in *Input) Done() <-chan struct{}

Done 返回任务状态channel

func (*Input) OnEvent

func (in *Input) OnEvent(data *util.Data) bool

OnEvent 处理input runner发送的事件

func (*Input) Reload

func (in *Input) Reload()

Reload : Input不做reload处理,配置如果有变化,直接删除新建

func (*Input) Run

func (in *Input) Run()

func (*Input) Start

func (in *Input) Start()

Start 启动runner 创建后则自动启动

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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