Versions in this module Expand all Collapse all v0 v0.0.1 Jan 13, 2026 Changes in this version + var ErrHookTimeout = errors.New("logjs: js hook timeout") + var ErrNoRegister = errors.New("logjs: script did not call register()") + func ParseOptions(opts Options) (options, error) + type ErrorRecord struct + Hook string + LineNumber int64 + Message string + Module string + RawLine *string + Source string + Tag string + Timeout bool + type Event struct + Fields map[string]any + Level string + LineNumber int64 + Message string + Raw string + Source string + Tags []string + Timestamp *string + type Fanout struct + Modules []*Module + func LoadFanoutFromFiles(ctx context.Context, scriptPaths []string, opts Options) (*Fanout, error) + func (f *Fanout) Close(ctx context.Context) error + func (f *Fanout) ProcessLine(ctx context.Context, line string, source string, lineNumber int64) ([]*Event, []*ErrorRecord, error) + type Module struct + func LoadFromFile(ctx context.Context, scriptPath string, opts Options) (*Module, error) + func (m *Module) Close(ctx context.Context) error + func (m *Module) Info() ModuleInfo + func (m *Module) Name() string + func (m *Module) ProcessLine(ctx context.Context, line string, source string, lineNumber int64) ([]*Event, []*ErrorRecord, error) + func (m *Module) ScriptPath() string + func (m *Module) Stats() Stats + func (m *Module) Tag() string + type ModuleInfo struct + HasFilter bool + HasInit bool + HasOnError bool + HasParse bool + HasShutdown bool + HasTransform bool + Name string + Tag string + type Options struct + HookTimeout string + type Stats struct + EventsEmitted int64 + HookErrors int64 + HookTimeouts int64 + LinesDropped int64 + LinesProcessed int64