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) 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.
Click to show internal directories.
Click to hide internal directories.