Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrShortRead = errors.New("read too short")
Functions ¶
func Pipe ¶
Pipe creates a synchronous in-memory pipe. It can be used to connect multiple passes in the Gordian program.
It relies internally on a circular buffer to pass data between the Gordian passes without copy.
It is safe to call Read and Write in parallel with each other or with Close. Parallel calls to Read and parallel calls to Write are not safe.
Types ¶
type GroupML ¶
type GroupML struct {
// contains filtered or unexported fields
}
GroupML re-assemble records spread over multiple lines. Given a specific pattern (regular expression), lines are grouped according to heuristic:
- if the current line matches the pattern, *as long as*
- the next line does not the pattern, *and*
- the next line is not an empty line
then they all belong to the same record.
type MaybeBzip2 ¶
type MaybeBzip2 Bzip2
func (*MaybeBzip2) Init ¶
func (g *MaybeBzip2) Init(_ *regexp.Regexp)
func (*MaybeBzip2) Pipe ¶
func (g *MaybeBzip2) Pipe(in io.Reader, out io.WriteCloser) error
type Reader ¶
type Reader struct { MaxSize int // contains filtered or unexported fields }
func (*Reader) Next ¶
Next will try to read up to n bytes from the corresponding writer. It might read less bytes if [MaxSize] is reached. It return false if the corresponding writer is closed, and all bytes have been read.
type UnixYear ¶ added in v0.1.2
type UnixYear struct{}
One of the most specialized operator: if the date field look like a month, fill in the year. Year is current one, except if log month is Dec and current month is january, in case this is past year. This heuristic matches broadly what is expected looking at logs.
Notes ¶
Bugs ¶
there is a deadlock condition here: if the Write needs to go to the slow path, and wait for the Read to happen, and that there are not enough Read to release space, we can deadlock.