package tail
import "k8s.io/kubernetes/pkg/util/tail"
Index ¶
- func FindTailLineStartIndex(f io.ReadSeeker, n int64) (int64, error)
- func ReadAtMost(path string, max int64) ([]byte, bool, error)
Functions ¶
func FindTailLineStartIndex ¶
func FindTailLineStartIndex(f io.ReadSeeker, n int64) (int64, error)
FindTailLineStartIndex returns the start of last nth line. * If n < 0, return the beginning of the file. * If n >= 0, return the beginning of last nth line. Notice that if the last line is incomplete (no end-of-line), it will not be counted as one line.
func ReadAtMost ¶
ReadAtMost reads at most max bytes from the end of the file identified by path or returns an error. It returns true if the file was longer than max. It will allocate up to max bytes.
Source Files ¶
tail.go
- Version
- v1.28.6
- Published
- Jan 17, 2024
- Platform
- js/wasm
- Imports
- 3 packages
- Last checked
- 13 seconds ago –
Tools for package owners.