You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lnav/src/tailer
Tim Stack bdc9c5a28d [prql] initial work for integrating PRQL 2 months ago
..
CMakeLists.txt [build] run cmake-init and switch from hunter to conan for packages 2 years ago
Makefile.am [cmds] fix some timezone issues with :convert-time-to and other spots 3 months ago
README.md [remote] add some docs and allow ssh command customization 3 years ago
drive_tailer.cc [modernize] some more cleanups 2 years ago
sha-256.c [build] fix ape build 3 years ago
sha-256.h [remote] optimize file syncing 3 years ago
tailer.ape Update tailer 9 months ago
tailer.c [build] missing include 3 years ago
tailer.h [tailer] send the uname of the remote host back 3 years ago
tailer.looper.cc [prql] initial work for integrating PRQL 2 months ago
tailer.looper.cfg.hh [clang-format] init 2 years ago
tailer.looper.hh [remote] notify main when desired paths are initially synced 2 years ago
tailer.main.c [build] silence some warnings 2 years ago
tailerpp.cc [console] colorize console output 2 years ago
tailerpp.hh [build] fix some warnings 2 years ago
test_tailer.sh [tests] test_tailer tweaks 2 years ago

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.