index

package
v0.0.0-...-511da98 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

Variables

This section is empty.

Functions

func SearchStreams

func SearchStreams(ctx context.Context, indexes []*Reader, limitIDs *bitmask.LongBitmask, refTime time.Time, qs query.ConditionsSet, grouping *query.Grouping, sorting []query.Sorting, limit, skip uint, tagDetails map[string]query.TagDetails, converters map[string]ConverterAccess, extractRegexes bool) ([]*Stream, bool, *DataRegexes, error)

Types

type ConverterAccess

type ConverterAccess interface {
	Data(stream *Stream, moreDetails bool) (data []Data, clientBytes, serverBytes uint64, wasCached bool, err error)
	DataForSearch(streamID uint64) ([2][]byte, [][2]int, uint64, uint64, bool, error)
}

type Data

type Data struct {
	Direction Direction
	Content   []byte
}

type DataRegexes

type DataRegexes struct {
	Client []string
	Server []string
}

type Direction

type Direction int
const (
	DirectionClientToServer Direction = 0
	DirectionServerToClient Direction = 1
)

func (Direction) Reverse

func (dir Direction) Reverse() Direction

type Packet

type Packet struct {
	Timestamp    time.Time
	PcapFilename string
	PcapIndex    uint64
	Direction    Direction
}

type Reader

type Reader struct {
	ReferenceTime time.Time
	// contains filtered or unexported fields
}

func Merge

func Merge(indexDir string, indexes []*Reader) ([]*Reader, error)

func NewReader

func NewReader(filename string) (*Reader, error)

func (*Reader) AllStreams

func (r *Reader) AllStreams(handler func(*Stream) error) error

func (*Reader) Close

func (r *Reader) Close() error

func (*Reader) Filename

func (r *Reader) Filename() string

func (*Reader) MaxStreamID

func (r *Reader) MaxStreamID() uint64

func (*Reader) MinStreamID

func (r *Reader) MinStreamID() uint64

func (*Reader) PacketCount

func (r *Reader) PacketCount() int

func (*Reader) StreamByFirstPacketSource

func (r *Reader) StreamByFirstPacketSource(pcapFilename string, packetIndex uint64) (*Stream, error)

func (*Reader) StreamByID

func (r *Reader) StreamByID(streamID uint64) (*Stream, error)

func (*Reader) StreamCount

func (r *Reader) StreamCount() int

func (*Reader) StreamIDs

func (r *Reader) StreamIDs() map[uint64]uint32

type Stream

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

func (*Stream) ClientHostIP

func (s *Stream) ClientHostIP() string

func (*Stream) Data

func (s *Stream) Data() ([]Data, error)

func (*Stream) FirstPacket

func (s *Stream) FirstPacket() time.Time

func (*Stream) ID

func (s *Stream) ID() uint64

func (*Stream) Index

func (s *Stream) Index() uint32

func (*Stream) LastPacket

func (s *Stream) LastPacket() time.Time

func (*Stream) MarshalJSON

func (s *Stream) MarshalJSON() ([]byte, error)

func (*Stream) Packets

func (s *Stream) Packets() ([]Packet, error)

func (*Stream) Protocol

func (s *Stream) Protocol() string

func (*Stream) Reader

func (s *Stream) Reader() *Reader

func (*Stream) ServerHostIP

func (s *Stream) ServerHostIP() string

type Writer

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

func NewWriter

func NewWriter(filename string) (*Writer, error)

func (*Writer) AddIndex

func (w *Writer) AddIndex(r *Reader) (bool, error)

func (*Writer) AddStream

func (w *Writer) AddStream(s *streams.Stream, streamID uint64) (bool, error)

func (*Writer) Close

func (w *Writer) Close() error

func (*Writer) Filename

func (w *Writer) Filename() string

func (*Writer) Finalize

func (w *Writer) Finalize() (*Reader, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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