minheap

package
Version: v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Packet

type Packet struct {
	Timestamp   int64
	CaptureInfo gopacket.CaptureInfo
	Data        []byte
	Reader      *pcapgo.Reader
	InputFile   *os.File
}

Packet is used by PacketHeap to order packets by timestamp and by joincap to merge pcaps

type PacketHeap

type PacketHeap []Packet

PacketHeap is a minimum heap of packets ordered by timestamp

func (PacketHeap) Len

func (h PacketHeap) Len() int

func (PacketHeap) Less

func (h PacketHeap) Less(i, j int) bool

func (*PacketHeap) Pop

func (h *PacketHeap) Pop() interface{}

Pop use pointer receivers because they modify the slice's length, not just its contents.

func (*PacketHeap) Push

func (h *PacketHeap) Push(x interface{})

Push use pointer receivers because they modify the slice's length, not just its contents.

func (PacketHeap) Swap

func (h PacketHeap) Swap(i, j int)

Source Files

Jump to

Keyboard shortcuts

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