task

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: 10 Imported by: 0

Documentation

Overview

Package task 采集任务

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Task

type Task struct {
	*base.TaskNode

	Config *cfg.TaskConfig
	// contains filtered or unexported fields
}

Task 采集任务具体实现,负责filebeat采集事件处理、过滤、打包,并发送到采集框架

func NewTask

func NewTask(config *cfg.TaskConfig, beatDone chan struct{}, lastStates []file.State) (*Task, error)

NewTask 生成采集任务实例

func (*Task) Reload

func (task *Task) Reload() error

Reload 通知各采集模块针对重载操作进行适配

func (*Task) Run

func (task *Task) Run()

func (*Task) Start

func (task *Task) Start()

Start 负责启动采集任务实例

func (*Task) Stop

func (task *Task) Stop() error

Stop 负责停止采集任务实例,在Filebeat采集插件停止后退出

func (*Task) String

func (task *Task) String() string

String 任务实例名称

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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