package
0.0.0-20210226174113-845418edcd33
Repository: https://github.com/badoo/lsd.git
Documentation: pkg.go.dev

# Functions

Read starts to watch for category's files and stream their content to linesCh line by line it deletes fully sent files immediately (no confirm mechanics) @TODO implement some kind of confirm if error occurs, Read exits immediately, closing all background stuff read process can be cancelled by cancelling parent ctx keep in mind that Read blocks your current goroutine, so you need to use it in separate one if you need more efficient read (batching, etc), you can use Watcher along with UnescapeLine func.
No description provided by the author
Watch starts to look through category's files and sends full file names that are ready to be processed to outChan if error occurs, Watch exits immediately, closing all background stuff watch process can be cancelled by cancelling parent ctx keep in mind that Watch blocks your current goroutine, so you need to use it separate one.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Category is used to compute paths according to lsd format.
Writer is used for events and data structures streaming best way to send events to LSD it writes events into <BaseDir>/<category>/<yyyymmddhhmm>.log files it also guarantees consistency for long lines (>4k) provides escaping of line breaks inside events (single event will always be sent as single line) for compatibility with badoo php library, we have to use analog of PHP's addcslashes($message, "\\\n") for escaping of lines so it's not safe to send raw binary data (without any encoding).