manager

package
v0.0.0-...-d9a865f Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	StateDir     string
	PcapDir      string
	IndexDir     string
	SnapshotDir  string
	ConverterDir string
	// contains filtered or unexported fields
}

func New

func New(pcapDir, indexDir, snapshotDir, stateDir, converterDir string) (*Manager, error)

func (*Manager) AddTag

func (mgr *Manager) AddTag(name, color, queryString string) error

func (*Manager) Close

func (mgr *Manager) Close()

func (*Manager) ConverterStderr

func (mgr *Manager) ConverterStderr(converterName string, pid int) (*converters.ProcessStderr, error)

func (*Manager) DelTag

func (mgr *Manager) DelTag(name string) error

func (*Manager) GetView

func (mgr *Manager) GetView() View

func (*Manager) ImportPcap

func (mgr *Manager) ImportPcap(filename string)

func (*Manager) KnownPcaps

func (mgr *Manager) KnownPcaps() []pcapmetadata.PcapInfo

func (*Manager) ListConverters

func (mgr *Manager) ListConverters() []*converters.Statistics

func (*Manager) ListTags

func (mgr *Manager) ListTags() []TagInfo

func (*Manager) ResetConverter

func (mgr *Manager) ResetConverter(converterName string) error

func (*Manager) Status

func (mgr *Manager) Status() Statistics

func (*Manager) UpdateTag

func (mgr *Manager) UpdateTag(name string, operation UpdateTagOperation) error

type Statistics

type Statistics struct {
	ImportJobCount      int
	IndexCount          int
	IndexLockCount      uint
	PcapCount           int
	StreamCount         int
	PacketCount         int
	MergeJobRunning     bool
	TaggingJobRunning   bool
	ConverterJobRunning bool
}

type StreamContext

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

func (StreamContext) AllConverters

func (c StreamContext) AllConverters() ([]string, error)

func (StreamContext) AllTags

func (c StreamContext) AllTags() ([]string, error)

func (StreamContext) Data

func (c StreamContext) Data(converterName string) ([]index.Data, error)

func (StreamContext) HasTag

func (c StreamContext) HasTag(name string) (bool, error)

func (StreamContext) Stream

func (c StreamContext) Stream() *index.Stream

type StreamsOption

type StreamsOption func(*streamsOptions)

func Limit

func Limit(defaultLimit, page uint) StreamsOption

func PrefetchAllTags

func PrefetchAllTags() StreamsOption

func PrefetchTags

func PrefetchTags(tags []string) StreamsOption

type TagInfo

type TagInfo struct {
	Name           string
	Definition     string
	Color          string
	MatchingCount  uint
	UncertainCount uint
	Referenced     bool
	Converters     []string
}

type UpdateTagOperation

type UpdateTagOperation func(*updateTagOperationInfo)

func UpdateTagOperationMarkAddStream

func UpdateTagOperationMarkAddStream(streams []uint64) UpdateTagOperation

func UpdateTagOperationMarkDelStream

func UpdateTagOperationMarkDelStream(streams []uint64) UpdateTagOperation

func UpdateTagOperationSetConverter

func UpdateTagOperationSetConverter(converterNames []string) UpdateTagOperation

func UpdateTagOperationUpdateColor

func UpdateTagOperationUpdateColor(color string) UpdateTagOperation

type View

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

func (*View) AllStreams

func (v *View) AllStreams(f func(StreamContext) error, options ...StreamsOption) error

func (*View) ReferenceTime

func (v *View) ReferenceTime() (time.Time, error)

func (*View) Release

func (v *View) Release()

func (*View) SearchStreams

func (v *View) SearchStreams(filter *query.Query, f func(StreamContext) error, options ...StreamsOption) (bool, uint, error)

func (*View) Stream

func (v *View) Stream(streamID uint64) (StreamContext, error)

Jump to

Keyboard shortcuts

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