app

package
v0.0.0-...-f0b9d49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package app is the main UI that used rivo/tview

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdvanceNextFileViewForward

func AdvanceNextFileViewForward(fileViews []fileView) int

AdvanceNextFileViewForward figures out which fileview is next in line and advances its current chunk. This is based on who has the most recent timestamp and it is called when navigating forward. This advances one step, so we choose one file to advance and advance it by one timestamped log line

func AdvancePrevFileViewBackward

func AdvancePrevFileViewBackward(fileViews []fileView) int

AdvancePrevFileViewBackward figures out which fileview is the closest previous log line and advances its current chunk backward. This is based on who has the latest previous time and it is called when navigating backward. This advances one step backward, so we choose one file to advance backward and advance back it by one timestamped log line

func MoveAllToBeginning

func MoveAllToBeginning(fileViews []fileView)

MoveAllToBeginning moves all log lines to their respective head log line at the beginning of the file

func MoveAllToEnd

func MoveAllToEnd(fileViews []fileView)

MoveAllToEnd moves all log lines to their respective tail log line at the end of the file.

func MoveAllToTime

func MoveAllToTime(fileViews []fileView, searchTime int64)

MoveAllToTime finds the closest log line to the searchTime and moves all the log lines such that they are at the log just before the searchTime. This allows us to search based on time and have all the logs jump to that spot.

func RunLogSync

func RunLogSync(args []string)

RunLogSync is the main tview function that builds the UI Right now, it consists of one text box for each file being viewed, and they are stacked on top of each other. Below that is an edit box for entering commands.

Here are the valid commands: "head" jumps all files to the beginning "tail" jumps all files to the end Any positive number jumps that many steps, where each step chooses the next log line based on time stamp and advancing that file foward one. Any negative number goes back that many steps. Also it is possible to search based on a timestamp like "2020-05-25|08:47:33.663" to jump to the closest log line for all the files

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL