qlog

package
v0.0.0-...-434cb5b Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: AGPL-3.0 Imports: 3 Imported by: 6

Documentation

Index

Constants

View Source
const (
	PacketTriggerReordering = "retransmit_reorder"
	PacketTriggerTimeout    = "retransmit_timeout"
	PacketTriggerPTO        = "pro_probe"
	PacketTriggerCrypto     = "retransmit_crypto"
	PacketTriggerBWProbe    = "cc_bandwidth_probe"
)
View Source
const (
	TimeUnits       = time.Microsecond
	TimeUnitsString = "us"
)

Variables

View Source
var Categories = struct {
	Connectivity struct {
		Category               string
		ServerListening        string
		ConnectionStarted      string
		ConnectionIDUpdated    string
		SpinBitUpdated         string
		ConnectionRetried      string
		ConnectionStateUpdated string
	}
	Transport struct {
		Category           string
		PacketSent         string
		PacketReceived     string
		PacketDropped      string
		PacketBuffered     string
		StreamStateUpdated string
	}
	Recovery struct {
		Category               string
		MetricsUpdated         string
		CongestionStateUpdated string
		LossTimerSet           string
		LossTimerFired         string
		PacketLost             string
		MarkedForRetransmit    string
	}
}{
	struct {
		Category               string
		ServerListening        string
		ConnectionStarted      string
		ConnectionIDUpdated    string
		SpinBitUpdated         string
		ConnectionRetried      string
		ConnectionStateUpdated string
	}{"connectivity", "server_listening", "connection_started", "connection_id_updated", "spin_bit_updated", "connection_retried", "connection_state_updated"},
	struct {
		Category           string
		PacketSent         string
		PacketReceived     string
		PacketDropped      string
		PacketBuffered     string
		StreamStateUpdated string
	}{"transport", "packet_sent", "packet_received", "packet_dropped", "packet_buffered", "stream_state_updated"},
	struct {
		Category               string
		MetricsUpdated         string
		CongestionStateUpdated string
		LossTimerSet           string
		LossTimerFired         string
		PacketLost             string
		MarkedForRetransmit    string
	}{"recovery", "metrics_updated", "congestion_state_updated", "loss_timer_set", "loss_timer_fired", "packet_lost", "marked_for_retransmit"},
}

Functions

func DefaultEventFields

func DefaultEventFields() []string

Types

type AckFrame

type AckFrame struct {
	FrameType   string     `json:"frame_type"`
	ACKDelay    uint64     `json:"ack_delay,string"`
	ACKedRanges [][]uint64 `json:"acked_ranges"`

	ECT1 uint64 `json:"ect1,omitempty"`
	ECT0 uint64 `json:"ect0,omitempty"`
	CE   uint64 `json:"ce,omitempty"`
}

type ConnectionCloseFrame

type ConnectionCloseFrame struct {
	FrameType  string `json:"frame_type"`
	ErrorSpace string `json:"error_space"`
	ErrorCode  uint64 `json:"error_code,string"`
	Reason     string `json:"reason"`
}

type CryptoFrame

type CryptoFrame struct {
	FrameType string `json:"frame_type"`
	Offset    uint64 `json:"offset,string"`
	Length    uint64 `json:"length,string"`
}

type DataBlockedFrame

type DataBlockedFrame struct {
	FrameType string `json:"frame_type"`
	Limit     uint64 `json:"limit,string"`
}

type Event

type Event struct {
	RelativeTime uint64
	Category     string
	Event        string
	Data         interface{}
}

func (*Event) MarshalJSON

func (e *Event) MarshalJSON() ([]byte, error)

type HandshakeDoneFrame

type HandshakeDoneFrame struct {
	FrameType string `json:"frame_type"`
}

type MaxDataFrame

type MaxDataFrame struct {
	FrameType string `json:"frame_type"`
	Maximum   uint64 `json:"maximum,string"`
}

type MaxStreamDataFrame

type MaxStreamDataFrame struct {
	FrameType string `json:"frame_type"`
	StreamID  uint64 `json:"stream_id,string"`
	Maximum   uint64 `json:"maximum,string"`
}

type MaxStreamsFrame

type MaxStreamsFrame struct {
	FrameType  string `json:"frame_type"`
	StreamType `json:"stream_type"`
	Maximum    uint64 `json:"maximum,string"`
}

type MetricUpdate

type MetricUpdate struct {
	CongestionWindow uint64 `json:"congestion_window,omitempty"`
	BytesInFlight    uint64 `json:"bytes_in_flight,omitempty"`
	MinRTT           uint64 `json:"min_rtt,omitempty"`
	SmoothedRTT      uint64 `json:"smoothed_rtt,omitempty"`
	LatestRTT        uint64 `json:"latest_rtt,omitempty"`
	MaxAckDelay      uint64 `json:"max_ack_delay,omitempty"`
	RTTVariance      uint64 `json:"rtt_variance,omitempty"`
	SSThresh         uint64 `json:"ssthresh,omitempty"`
	PacingRate       uint64 `json:"pacing_rate,omitempty"`
}

type NewConnectionIDFrame

type NewConnectionIDFrame struct {
	FrameType      string `json:"frame_type"`
	SequenceNumber uint64 `json:"sequence_number,string"`
	RetirePriorTo  uint64 `json:"retire_prior_to,string"`
	Length         uint8  `json:"length"`
	ConnectionID   string `json:"connection_id"`
	ResetToken     string `json:"reset_token"`
}

type NewTokenFrame

type NewTokenFrame struct {
	FrameType string `json:"frame_type"`
	Length    uint64 `json:"length,string"`
	Token     string `json:"token"`
}

type Packet

type Packet struct {
	PacketType string        `json:"packet_type"`
	Header     PacketHeader  `json:"header"`
	Frames     []interface{} `json:"frames,omitempty"`

	IsCoalesced bool   `json:"is_coalesced,omitempty"`
	Trigger     string `json:"trigger,omitempty"`
}

type PacketBuffered

type PacketBuffered struct {
	PacketType string `json:"packet_type"`
	Trigger    string `json:"trigger"`
}

type PacketHeader

type PacketHeader struct {
	PacketNumber  uint64 `json:"packet_number,string"`
	PacketSize    int    `json:"packet_size,omitempty"`
	PayloadLength int    `json:"payload_length,omitempty"`

	Version string `json:"version,omitempty"`
	SCIL    string `json:"scil,omitempty"`
	DCIL    string `json:"dcil,omitempty"`
	SCID    string `json:"scid,omitempty"`
	DCID    string `json:"dcid,omitempty"`
}

type PacketLost

type PacketLost struct {
	PacketType   string        `json:"packet_type"`
	PacketNumber uint64        `json:"packet_number,string"`
	Frames       []interface{} `json:"frames"`
	Trigger      string        `json:"trigger"`
}

type PacketTrigger

type PacketTrigger string

type PathChallengeFrame

type PathChallengeFrame struct {
	FrameType string `json:"frame_type"`
	Data      string `json:"data"`
}

type PathResponseFrame

type PathResponseFrame struct {
	FrameType string `json:"frame_type"`
	Data      string `json:"data"`
}

type PingFrame

type PingFrame struct {
	FrameType string `json:"frame_type"`
}

type QLog

type QLog struct {
	Version     string                 `json:"qlog_version"`
	Title       string                 `json:"title"`
	Description string                 `json:"description"`
	Summary     map[string]interface{} `json:"summary"`
	Traces      []*Trace               `json:"traces"`
}

type ResetStreamFrame

type ResetStreamFrame struct {
	FrameType   string `json:"frame_type"`
	StreamID    uint64 `json:"stream_id,string"`
	ErrorCode   uint64 `json:"error_code,string"`
	FinalOffset uint64 `json:"final_offset,string"`
}

type RetireConnectionIDFrame

type RetireConnectionIDFrame struct {
	FrameType      string `json:"frame_type"`
	SequenceNumber uint64 `json:"sequence_number,string"`
}

type StopSendingFrame

type StopSendingFrame struct {
	FrameType string `json:"frame_type"`
	StreamID  uint64 `json:"stream_id,string"`
	ErrorCode uint64 `json:"error_code,string"`
}

type StreamDataBlockedFrame

type StreamDataBlockedFrame struct {
	FrameType string `json:"frame_type"`
	StreamID  uint64 `json:"stream_id,string"`
	Limit     uint64 `json:"limit,string"`
}

type StreamFrame

type StreamFrame struct {
	FrameType string `json:"frame_type"`
	StreamID  uint64 `json:"stream_id,string"`
	Offset    uint64 `json:"offset,string"`
	Length    uint64 `json:"length,string"`
	Fin       bool   `json:"fin,omitempty"`
}

type StreamType

type StreamType string
const (
	StreamTypeBidi StreamType = "bidirectional"
	StreamTypeUni  StreamType = "unidirectional"
)

type StreamsBlockedFrame

type StreamsBlockedFrame struct {
	FrameType  string `json:"frame_type"`
	StreamType `json:"stream_type"`
	Limit      uint64 `json:"limit,string"`
}

type Trace

type Trace struct {
	VantagePoint struct {
		Name string `json:"name"`
		Type string `json:"type"`
	} `json:"vantage_point"`
	Title         string `json:"title"`
	Description   string `json:"description"`
	Configuration struct {
		TimeOffset uint64 `json:"time_offset,string"`
		TimeUnits  string `json:"time_units"`
	} `json:"configuration"`
	CommonFields map[string]interface{} `json:"common_fields"`
	EventFields  []string               `json:"event_fields"`
	Events       []*Event               `json:"events"`

	ReferenceTime time.Time `json:"-"`
}

func (*Trace) Add

func (t *Trace) Add(e *Event)

func (*Trace) NewEvent

func (t *Trace) NewEvent(category, eventType string, data interface{}) *Event

func (*Trace) Sort

func (t *Trace) Sort()

type UnknownFrame

type UnknownFrame struct {
	FrameType    string `json:"frame_type"`
	RawFrameType uint64 `json:"raw_frame_type,string"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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