recording

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Record

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

Record contains a single recorded packet.

func NewRecord

func NewRecord(data []byte, direction TrafficDirection) Record

func (*Record) Data

func (r *Record) Data() []byte

func (*Record) Direction

func (r *Record) Direction() TrafficDirection

func (*Record) Timestamp

func (r *Record) Timestamp() time.Time

type Records

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

Records contains a series of recorded packets.

func NewRecords

func NewRecords() Records

func (*Records) Append

func (r *Records) Append(data []byte, direction TrafficDirection)

func (*Records) Clear

func (r *Records) Clear()

func (*Records) Export

func (r *Records) Export() []Record

func (*Records) Size

func (r *Records) Size() int

type TrafficDirection

type TrafficDirection int
const (
	Ingress TrafficDirection = 0
	Egress  TrafficDirection = 1
)

Jump to

Keyboard shortcuts

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