worker

package
v0.0.0-...-7cfb5ad Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListenOptions

type ListenOptions struct {
	Device, PcapFile string

	SnapLen     int32
	Promiscuous bool
	BPFFilter   string

	Timeout       time.Duration
	CaptureLayers []gopacket.LayerType
}

func (*ListenOptions) Validate

func (o *ListenOptions) Validate() (*ListenOptions, error)

type Worker

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

func New

func New(ctx context.Context, opts *WorkerOptions) (w *Worker, c context.Context, err error)

func (*Worker) Cancel

func (w *Worker) Cancel()

func (*Worker) Exec

func (w *Worker) Exec(ctx context.Context) error

func (*Worker) ExportStats

func (w *Worker) ExportStats() stat.Worker

func (*Worker) ID

func (w *Worker) ID() uuid.UUID

type WorkerOptions

type WorkerOptions struct {
	ListenOptions

	AssembleTypes []assemble.AssembleType
}

func (*WorkerOptions) Validate

func (o *WorkerOptions) Validate() (*WorkerOptions, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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