1 Star 0 Fork 0

zhangjungang/beats

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.go 574 Bytes
一键复制 编辑 原始数据 按行查看 历史
Tudor Golubenco 提交于 2015-09-03 05:35 +08:00 . Switch to the beat module from libbeat
package main
import (
"github.com/elastic/libbeat/beat"
)
func main() {
// Create Beater object
pb := &Packetbeat{}
// Initi beat objectefile
b := beat.NewBeat(Name, Version, pb)
// Additional command line args are used to overwrite config options
pb.CmdLineArgs = fetchAdditionalCmdLineArgs(b.CmdLine)
// Base CLI flags
b.CommandLineSetup()
// Beat CLI flags
pb.CliFlags(b)
// Loads base config
b.LoadConfig()
// Configures beat
pb.Config(b)
// Run beat. This calls first beater.Setup,
// then beater.Run and beater.Cleanup in the end
b.Run()
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangjungang/beats.git
git@gitee.com:zhangjungang/beats.git
zhangjungang
beats
beats
v1.0.0-beta3

搜索帮助