Documentation
¶
Index ¶
- type Config
- type Interface
- func Combiner(zctx *zson.Context, pcap io.Reader, confs ...Config) Interface
- func CombinerWithContext(ctx context.Context, zctx *zson.Context, pcap io.Reader, confs ...Config) Interface
- func New(zctx *zson.Context, r io.Reader, conf Config) Interface
- func NewWithContext(ctx context.Context, zctx *zson.Context, r io.Reader, conf Config) Interface
- type Launcher
- type Process
- type ProcessExitError
- type ProcessWaiter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Args []string `yaml:"args"`
Cmd string `yaml:"cmd"`
Globs []string `yaml:"globs"`
Launcher Launcher `yaml:"-"`
ReaderOpts anyio.ReaderOpts `yaml:"-"`
Shaper string `yaml:"shaper"`
StdoutPath string `yaml:"stdout"`
StderrPath string `yaml:"stderr"`
// WorkDir if set uses the provided directory as the working directory for
// the launched analyzer process. Normally a temporary directory is created
// then deleted when the process is complete. If WorkDir is set the working
// directory will not be deleted.
WorkDir string `yaml:"workdir"`
}
func LoadYAMLConfigFile ¶
type Interface ¶
type Interface interface {
zio.ReadCloser
BytesRead() int64
RecordsRead() int64
WarningHandler(zio.Warner)
}
func CombinerWithContext ¶
type Launcher ¶
Launcher is a function to start a pcap import process given a context, input pcap reader, and target output dir. If the process is started successfully, a ProcessWaiter and nil error are returned. If there is an error starting the Process, that error is returned.
type ProcessExitError ¶
type ProcessExitError struct {
Args []string
Err *exec.ExitError
Path string
Stderr []byte
Stdout []byte
}
func (*ProcessExitError) Error ¶
func (p *ProcessExitError) Error() string
type ProcessWaiter ¶
type ProcessWaiter interface {
// Wait waits for a running process to exit, returning any errors that
// occur.
Wait() error
}
ProcessWaiter is an interface for interacting with a running process.
Click to show internal directories.
Click to hide internal directories.