Skip to content

[QUESTION]:Why frequently use util.RandomSleep? #369

Answered by messixukejia
JeffPhoneix asked this question in Help
Discussion options

You must be logged in to vote

golang实现的LogFileReader,仅仅是在K8s标准输出采集下使用,这里是一种轮询的机制,轮询要有一点时间间隔,降低不必要的系统调用。

而对于K8s文件采集则由c++部分实现,采用了轮询(polling)与事件(inotify)并存的模式进行日志采集,具体原理参见https://mp.weixin.qq.com/s/5j5KJe9BmpZ1tdb-KCx_CQ。

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@messixukejia
Comment options

Answer selected by Takuka0311
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
question Further information is requested
3 participants
Converted from issue

This discussion was converted from issue #199 on September 06, 2022 06:10.