lib

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

README

Lua Selector

  • Follows pan.Selector interface
  • Has additional SetPreferences feature
  • Supports state querying and manipulation via JSON() callback

Lua API

Lua scripts needs to implement the following functions:

-- gets called when a set of paths to addr is known
function panapi.Initialize(prefs, laddr, raddr, ps)

function panapi.SetPreferences(prefs, laddr, raddr)

-- gets called for every packet
-- implementation needs to be efficient
function panapi.Path(laddr, raddr)

-- gets called whenever a path disappears
function panapi.PathDown(laddr, raddr, fp, pi)

function panapi.Refresh(laddr, raddr, ps)

function panapi.Close(laddr, raddr)

function panapi.Periodic(seconds)

Lua scripts can call the following functions from the panapi module:

panapi.Log(...)

panapi.Now()

Changelog

Version 0.0.2

  • Improvements to JSON robustness

Version 0.0.1

  • JSON Interface to/from Lua working (via JSON callback)
  • First stabs at better documentation

TODO

QUIC Tracer

QUIC connection properties are available in the following functions:

function stats.UpdatedMetrics(laddr, raddr, rttStats, cwnd, bytesInFlight, packetsInFlight)

function stats.SentPacket(laddr, raddr, size)

function stats.TracerForConnection(id, p, odcid)

function stats.StartedConnection(laddr, raddr, srcid, dstid)

function stats.NegotiatedVersion(laddr, raddr)

function stats.ClosedConnection(laddr, raddr)

function stats.Close(laddr, raddr)

function stats.SentTransportParameters(laddr, raddr)

function stats.ReceivedTransportParameters(laddr, raddr)

function stats.RestoredTransportParameters(laddr, raddr)

function stats.ReceivedVersionNegotiationPacket(laddr, raddr)

function stats.ReceivedRetry(laddr, raddr)

function stats.ReceivedPacket(laddr, raddr)

function stats.BufferedPacket(laddr, raddr)

function stats.DroppedPacket(laddr, raddr)

function stats.AcknowledgedPacket(laddr, raddr)

function stats.LostPacket(laddr, raddr)

function stats.UpdatedCongestionState(laddr, raddr)

function stats.UpdatedPTOCount(laddr, raddr)

function stats.UpdatedKeyFromTLS(laddr, raddr)

function stats.UpdatedKey(laddr, raddr)

function stats.DroppedEncryptionLevel(laddr, raddr)

function stats.DroppedKey(laddr, raddr)

function stats.SetLossTimer(laddr, raddr)

function stats.LossTimerExpired(laddr, raddr)

function stats.LossTimerCanceled(laddr, raddr)

function stats.Debug(laddr, raddr)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DummyTLSConfig

func DummyTLSConfig() tls.Config

func GenerateTLSConfig

func GenerateTLSConfig() tls.Config

func NewRPCClient

func NewRPCClient() (*rpc.Client, error)

func RPCClientHelper

func RPCClientHelper() (selector extra.Selector, err error)

func RPCClientHelper() (selector extra.Selector, tracer logging.Tracer, err error) {

Types

This section is empty.

Directories

Path Synopsis
cmd
example

Jump to

Keyboard shortcuts

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