1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/logger/jsonfilelog
Brian Goff 5a664dc87d jsonfile: more defensive reader implementation
Tonis mentioned that we can run into issues if there is more error
handling added here. This adds a custom reader implementation which is
like io.MultiReader except it does not cache EOF's.
What got us into trouble in the first place is `io.MultiReader` will
always return EOF once it has received an EOF, however the error
handling that we are going for is to recover from an EOF because the
underlying file is a file which can have more data added to it after
EOF.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-03-18 18:44:46 +00:00
..
jsonlog Reduce allocations for logfile reader 2020-04-08 12:24:31 -07:00
jsonfilelog.go goimports: fix imports 2019-09-18 12:56:54 +02:00
jsonfilelog_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
read.go jsonfile: more defensive reader implementation 2021-03-18 18:44:46 +00:00
read_test.go Fix handling for json-file io.UnexpectedEOF 2021-03-11 20:01:03 +00:00