nettraceStorage

package
v0.0.0-...-26a4fcb Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltBatchSink

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

BoltBatchSink offloads batches of netTrace data into BoltDB and supports exporting them into a single JSON file.

func NewBoltBatchSink

func NewBoltBatchSink(dbPath string) (*BoltBatchSink, error)

NewBoltBatchSink opens/creates the BoltDB file and initializes buckets.

func (*BoltBatchSink) Close

func (s *BoltBatchSink) Close() error

Close closes the BoltDB.

func (*BoltBatchSink) DeleteDBFile

func (s *BoltBatchSink) DeleteDBFile() error

DeleteDBFile deletes the BoltDB file, based on session UUID

func (*BoltBatchSink) ExportToJSON

func (s *BoltBatchSink) ExportToJSON(filePath string, meta nt.NetTrace) error

ExportToJSON writes one JSON file with everything persisted in Bbolt. Pass the meta you receive from server.GetTrace (which now returns only NetTraceMeta + pcaps).

func (*BoltBatchSink) HandleBatch

func (s *BoltBatchSink) HandleBatch(b nt.BatchSnapshot)

HandleBatch persists a batch (upsert by TraceID). Safe to call concurrently.

func (*BoltBatchSink) Handler

func (s *BoltBatchSink) Handler() nt.BatchCallback

Handler returns a nettrace.BatchCallback to pass into WithBatchOffload.

Jump to

Keyboard shortcuts

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