diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-13 09:13:51 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-13 09:13:51 +0200 |
| commit | 7a79d0a8bf58b05dfbae331d00275739530b9584 (patch) | |
| tree | 156a7c91984f11cb334a589649f337e8fa7c434d /internal/io/line/line.go | |
| parent | 9f6850fc202e048dcdbfa6ffb59589d4a851cd84 (diff) | |
task 682e6ae9: filter stale generation output
Diffstat (limited to 'internal/io/line/line.go')
| -rw-r--r-- | internal/io/line/line.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/io/line/line.go b/internal/io/line/line.go index 97e7795..e1d7bf8 100644 --- a/internal/io/line/line.go +++ b/internal/io/line/line.go @@ -30,6 +30,8 @@ type Line struct { // directories in case multiple log files with the same basename are // followed. SourceID string + // Session generation this line belongs to. Zero means unscoped/legacy output. + Generation uint64 } // New creaters a new line object. This is a DTail internal helper structure for reading files. @@ -39,6 +41,7 @@ func New(content *bytes.Buffer, count uint64, transmittedPerc int, sourceID stri l.Count = count l.TransmittedPerc = transmittedPerc l.SourceID = sourceID + l.Generation = 0 return l } @@ -72,4 +75,5 @@ func (l *Line) NullValues() { l.Count = 0 l.TransmittedPerc = 0 l.SourceID = "" + l.Generation = 0 } |
