tailf

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusNormal = 1
	StatusDelete = 2
)

Variables

This section is empty.

Functions

func InitTailf

func InitTailf(collects []Collect, chanSize int, ip string) (err error)

初始化tailf

func UpdateTailfTask

func UpdateTailfTask(collectConfig []Collect) (err error)

更新tailf任务

Types

type Collect

type Collect struct {
	Topic   string `json:"topic"`
	LogPath string `json:"logPath"`
}

日志收集任务定义

type KafkaMsg

type KafkaMsg struct {
	// Msg *tail.Line `json:"msg"`
	Msg string `json:"msg"`
	Ip  string `json:"ip"`
}

发送到kafka的消息

type TailObj

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

tailf任务对象

type TailsObjMgr

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

tailf任务对象管理

type TextMsg

type TextMsg struct {
	Msg   KafkaMsg
	Topic string
}

发送消息结构体

func GetOneLine

func GetOneLine() (msg *TextMsg)

从chan中获取一行数据

Jump to

Keyboard shortcuts

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