lua

package
v0.3.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright 2021 Thorben Krüger (thorben.krueger@ovgu.de)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2021 Thorben Krüger (thorben.krueger@ovgu.de)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2021 Thorben Krüger (thorben.krueger@ovgu.de)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSelector

func NewSelector(state *State) rpc.ServerSelector

func NewLuaSelector(script string) (*LuaSelector, error) {

func NewStats

func NewStats(state *State) rpc.ServerConnectionTracer

Types

type LuaSelector

type LuaSelector struct {
	*State
	// contains filtered or unexported fields
}

func (*LuaSelector) Close

func (s *LuaSelector) Close(local, remote pan.UDPAddr) error

func (*LuaSelector) Initialize

func (s *LuaSelector) Initialize(local, remote pan.UDPAddr, paths []*pan.Path) error

func (*LuaSelector) Path

func (s *LuaSelector) Path(local, remote pan.UDPAddr) (*pan.Path, error)

func (*LuaSelector) PathDown

func (s *LuaSelector) PathDown(local, remote pan.UDPAddr, fp pan.PathFingerprint, pi pan.PathInterface) error

func (*LuaSelector) Refresh

func (s *LuaSelector) Refresh(local, remote pan.UDPAddr, paths []*pan.Path) error

type State

type State struct {
	*lua.LState
	sync.Mutex
	*log.Logger
}

func NewState

func NewState() *State

func (*State) LoadScript

func (s *State) LoadScript(fname string) error

type Stats

type Stats struct {
	*State
	// contains filtered or unexported fields
}

func (*Stats) AcknowledgedPacket

func (s *Stats) AcknowledgedPacket(local, remote *pan.UDPAddr, level logging.EncryptionLevel, num logging.PacketNumber) error

func (*Stats) BufferedPacket

func (s *Stats) BufferedPacket(local, remote *pan.UDPAddr, ptype logging.PacketType) error

func (*Stats) Close

func (s *Stats) Close(local, remote *pan.UDPAddr) error

func (*Stats) ClosedConnection

func (s *Stats) ClosedConnection(local, remote *pan.UDPAddr, err error) error

func (*Stats) Debug

func (s *Stats) Debug(local, remote *pan.UDPAddr, name, msg string) error

func (*Stats) DroppedEncryptionLevel

func (s *Stats) DroppedEncryptionLevel(local, remote *pan.UDPAddr, level logging.EncryptionLevel) error

func (*Stats) DroppedKey

func (s *Stats) DroppedKey(local, remote *pan.UDPAddr, generation logging.KeyPhase) error

func (*Stats) DroppedPacket

func (s *Stats) DroppedPacket(local, remote *pan.UDPAddr, ptype logging.PacketType, size logging.ByteCount, reason logging.PacketDropReason) error

func (*Stats) LossTimerCanceled

func (s *Stats) LossTimerCanceled(local, remote *pan.UDPAddr) error

func (*Stats) LossTimerExpired

func (s *Stats) LossTimerExpired(local, remote *pan.UDPAddr, ttype logging.TimerType, level logging.EncryptionLevel) error

func (*Stats) LostPacket

func (s *Stats) LostPacket(local, remote *pan.UDPAddr, level logging.EncryptionLevel, num logging.PacketNumber, reason logging.PacketLossReason) error

func (*Stats) NegotiatedVersion

func (s *Stats) NegotiatedVersion(local, remote *pan.UDPAddr, chosen logging.VersionNumber, clientVersions, serverVersions []logging.VersionNumber) error

func (*Stats) ReceivedPacket

func (s *Stats) ReceivedPacket(local, remote *pan.UDPAddr, hdr *logging.ExtendedHeader, size logging.ByteCount, frames []logging.Frame) error

func (*Stats) ReceivedRetry

func (s *Stats) ReceivedRetry(local, remote *pan.UDPAddr, hdr *logging.Header) error

func (*Stats) ReceivedTransportParameters

func (s *Stats) ReceivedTransportParameters(local, remote *pan.UDPAddr, parameters *logging.TransportParameters) error

func (*Stats) ReceivedVersionNegotiationPacket

func (s *Stats) ReceivedVersionNegotiationPacket(local, remote *pan.UDPAddr, hdr *logging.Header, versions []logging.VersionNumber) error

func (*Stats) RestoredTransportParameters

func (s *Stats) RestoredTransportParameters(local, remote *pan.UDPAddr, parameters *logging.TransportParameters) error

func (*Stats) SentPacket

func (s *Stats) SentPacket(local, remote *pan.UDPAddr, hdr *logging.ExtendedHeader, size logging.ByteCount, ack *logging.AckFrame, frames []logging.Frame) error

func (*Stats) SentTransportParameters

func (s *Stats) SentTransportParameters(local, remote *pan.UDPAddr, parameters *logging.TransportParameters) error

func (*Stats) SetLossTimer

func (s *Stats) SetLossTimer(local, remote *pan.UDPAddr, ttype logging.TimerType, level logging.EncryptionLevel, t time.Time) error

func (*Stats) StartedConnection

func (s *Stats) StartedConnection(local, remote *pan.UDPAddr, srcConnID, destConnID logging.ConnectionID) error

func (*Stats) TracerForConnection

func (s *Stats) TracerForConnection(tracer_id uint64, p logging.Perspective, odcid logging.ConnectionID) error

func (*Stats) UpdatedCongestionState

func (s *Stats) UpdatedCongestionState(local, remote *pan.UDPAddr, state logging.CongestionState) error

func (*Stats) UpdatedKey

func (s *Stats) UpdatedKey(local, remote *pan.UDPAddr, generation logging.KeyPhase, rmte bool) error

func (*Stats) UpdatedKeyFromTLS

func (s *Stats) UpdatedKeyFromTLS(local, remote *pan.UDPAddr, level logging.EncryptionLevel, p logging.Perspective) error

func (*Stats) UpdatedMetrics

func (s *Stats) UpdatedMetrics(local, remote *pan.UDPAddr, rttStats *rpc.RTTStats, cwnd, bytesInFlight logging.ByteCount, packetsInFlight int) error

func (*Stats) UpdatedPTOCount

func (s *Stats) UpdatedPTOCount(local, remote *pan.UDPAddr, value uint32) error

Jump to

Keyboard shortcuts

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