967452a3f0
This PR switches to using plain fifo files instead of golang structs managed by containerd/fifo library. The library main benefit is management of opening fifo files. In Linux, a reader `open()` request would block until a writer opens the file (and vice-versa). The library uses goroutines so that it's the first IO operation that blocks. This benefit isn't really useful for us: Given that logmon simply streams output in a separate process, blocking of opening or first read is effectively the same. The library additionally makes further complications for managing state and tracking read/write permission that seems overhead for our use, compared to using a file directly. Looking here, I made the following incidental changes: * document that we do handle if fifo files are already created, as we rely on that behavior for logmon restarts * use type system to lock read vs write: currently, fifo library returns `io.ReadWriteCloser` even if fifo is opened for writing only! |
||
---|---|---|
.. | ||
allocdir | ||
allochealth | ||
allocrunner | ||
allocwatcher | ||
config | ||
consul | ||
devicemanager | ||
fingerprint | ||
interfaces | ||
lib | ||
logmon | ||
pluginmanager | ||
servers | ||
state | ||
stats | ||
structs | ||
taskenv | ||
testutil | ||
vaultclient | ||
acl.go | ||
acl_test.go | ||
alloc_endpoint.go | ||
alloc_endpoint_test.go | ||
alloc_watcher_e2e_test.go | ||
client.go | ||
client_stats_endpoint.go | ||
client_stats_endpoint_test.go | ||
client_test.go | ||
driver_manager_test.go | ||
fingerprint_manager.go | ||
fingerprint_manager_test.go | ||
fs_endpoint.go | ||
fs_endpoint_test.go | ||
gc.go | ||
gc_test.go | ||
node_updater.go | ||
rpc.go | ||
rpc_test.go | ||
testing.go | ||
util.go | ||
util_test.go |