ingest

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: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoLogIngestSupport = errors.New("space does not support log ingest")
)

Functions

This section is empty.

Types

type ClearableStore added in v0.20.0

type ClearableStore interface {
	storage.Storage
	Clear(ctx context.Context) error
}

type LogOp added in v0.14.0

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

func NewLogOp added in v0.14.0

func NewLogOp(ctx context.Context, store storage.Storage, req api.LogPostRequest) (*LogOp, error)

Logs ingests the provided list of files into the provided space. Like ingest.Pcap, this overwrites any existing data in the space.

func (*LogOp) Error added in v0.14.0

func (p *LogOp) Error() error

Error indicates what if any error occurred during import, after the Status channel is closed. The result is undefined while Status is open.

func (*LogOp) Stats added in v0.14.0

func (p *LogOp) Stats() api.LogPostStatus

func (*LogOp) Status added in v0.14.0

func (p *LogOp) Status() <-chan string

type PcapOp added in v0.14.0

type PcapOp struct {
	StartTime nano.Ts
	PcapSize  int64
	// contains filtered or unexported fields
}

func NewPcapOp added in v0.14.0

func NewPcapOp(ctx context.Context, pcapstore *pcapstorage.Store, store ClearableStore, pcap string, slauncher, zlauncher pcapanalyzer.Launcher) (*PcapOp, []string, error)

NewPcapOp kicks of the process for ingesting a pcap file into a space. Should everything start out successfully, this will return a thread safe Process instance once zeek log files have started to materialize in a tmp directory. If zeekExec is an empty string, this will attempt to resolve zeek from $PATH.

func (*PcapOp) Done added in v0.14.0

func (p *PcapOp) Done() <-chan struct{}

Done returns a chan that emits when the ingest process is complete.

func (*PcapOp) Err added in v0.14.0

func (p *PcapOp) Err() error

Err returns the an error if an error occurred while the ingest process was running. If the process is still running Err will wait for the process to complete before returning.

func (*PcapOp) PcapReadSize added in v0.14.0

func (p *PcapOp) PcapReadSize() int64

PcapReadSize returns the total size in bytes of data read from the underlying pcap file.

func (*PcapOp) Snap added in v0.14.0

func (p *PcapOp) Snap() <-chan struct{}

Snap returns a chan that emits every time a snapshot is made. It should no longer be read from after Done() has emitted.

func (*PcapOp) SnapshotCount added in v0.14.0

func (p *PcapOp) SnapshotCount() int

func (*PcapOp) Write added in v0.14.0

func (p *PcapOp) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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