pcapanalyzer

package
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2020 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("executable not found")

ErrNotFound is returned from LauncherFromPath when the zeek executable is not found.

Functions

This section is empty.

Types

type Launcher

type Launcher func(context.Context, io.Reader, string) (ProcessWaiter, error)

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.

func LauncherFromPath

func LauncherFromPath(path string) (Launcher, error)

LauncherFromPath returns a Launcher instance that will execute a pcap to zeek log transformation, using the provided path to the command. zeekpath should point to an executable or script that: - expects to receive a pcap file on stdin - writes the resulting logs into its working directory

type Process

type Process struct {
	// contains filtered or unexported fields
}

func NewProcess

func NewProcess(cmd *exec.Cmd) *Process

func (*Process) Start

func (p *Process) Start() error

func (*Process) Wait

func (p *Process) Wait() error

type ProcessWaiter

type ProcessWaiter interface {
	// Wait waits for a running process to exit, returning any errors that
	// occur.
	Wait() error
}

Process is an interface for interacting running with a running process.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL