lnav/src/tailer
Tim Stack faeaf477ab [yajlpp] flesh things out a bit more 2022-10-04 21:17:01 -07:00
..
CMakeLists.txt [build] run cmake-init and switch from hunter to conan for packages 2022-03-13 22:44:12 -07:00
Makefile.am [build] try to fix win build 2022-09-22 15:46:12 -07:00
README.md [remote] add some docs and allow ssh command customization 2021-06-01 22:57:32 -07:00
drive_tailer.cc [modernize] some more cleanups 2022-03-31 08:59:33 -07:00
sha-256.c [build] fix ape build 2021-09-14 21:28:15 -07:00
sha-256.h [remote] optimize file syncing 2021-09-14 21:20:25 -07:00
tailer.ape Update tailer 2022-04-04 16:15:44 +00:00
tailer.c [build] missing include 2021-09-14 21:44:35 -07:00
tailer.h [tailer] send the uname of the remote host back 2021-06-09 22:43:55 -07:00
tailer.looper.cc [yajlpp] flesh things out a bit more 2022-10-04 21:17:01 -07:00
tailer.looper.cfg.hh [clang-format] init 2022-03-16 15:38:08 -07:00
tailer.looper.hh [remote] notify main when desired paths are initially synced 2022-08-03 23:01:38 -07:00
tailer.main.c [build] silence some warnings 2022-03-28 22:00:49 -07:00
tailerpp.cc [console] colorize console output 2022-04-12 16:07:13 -07:00
tailerpp.hh [build] fix some warnings 2022-08-12 22:07:33 -07:00
test_tailer.sh [tests] test_tailer tweaks 2022-09-22 10:54:09 -07:00

README.md

Tailer

This directory contains the functionality for monitoring remote files. The name "tailer" refers to the binary that is transferred to the remote host that takes care of tailing files and sending the contents back to the host that is running the main lnav binary. To ease integration with lnav's existing functionality, the remote files are mirrored locally. The tailer also supports interactive use by providing previews of file contents and TAB-completion possibilities.

Files

The important files in this directory are:

  • tailer.main.c - The main() implementation for the tailer.
  • tailer.looper.hh - The service in the main lnav binary that transfers tailers to hosts and communicates with them.
  • tailer.h and tailerpp.hh - Utility libraries for the tailer protocol.
  • tailer.ape - The αcτµαlly pδrταblε εxεcµταblε build of the tailer. This binary is produced by a GitHub Action and checked in so the build process doesn't need to be supported on lots of platforms.

Flow

When a remote-path is passed to lnav, the file_collection.hh logic forwards the request to the tailer::looper service. This service makes two connections to the remote host using the ssh command so that the user's custom configurations will be used. The first connection is used to transfer the "tailer.ape" binary and make it executable. The second connection starts the tailer and uses stdin/stdout for a binary protocol and stderr for logging. The tailer then waits for requests to open files, preview files, and get possible paths for TAB-completions.