其他分享
首页 > 其他分享> > filebeat 笔记(持续补充)

filebeat 笔记(持续补充)

作者:互联网

有初步转 go 的意愿,大概看了下 filebeat 的代码,发现 filebeat 的源码值得剖析,不过也是个逐步的过程。

filebeat 整体是个多 input -> 单 output 的过程,那么就看看数据是怎么通过代码流转的?

bufferingEventLoop 我认为是一个顶层的类,它有一个 broker 属性,所有 input 和 output 的事件先汇入到 broker 的 channel 中,bufferingEventLoop 对输入的事件进行缓存,并批量处理,

事件流如下:producer.Publish -> broker.pushChan -> bufferingEventLoop.buf -> bufferingEventLoop.flushList -> consumer.Get

标签:filebeat,补充,bufferingEventLoop,笔记,broker,事件,output,input
来源: https://www.cnblogs.com/allenwas3/p/16689591.html