Documentation ¶
Index ¶
- type MeasurementPacket
- type TwampLightClient
- type TwampLightConnection
- type TwampLightSession
- type TwampLightTest
- func (t *TwampLightTest) FormatJSON(r *common.PingResults)
- func (t *TwampLightTest) GetConnection() *net.UDPConn
- func (t *TwampLightTest) GetLocalTestHost() string
- func (t *TwampLightTest) GetRemoteTestHost() string
- func (t *TwampLightTest) GetRemoteTestPort() int
- func (t *TwampLightTest) GetSession() *TwampLightSession
- func (t *TwampLightTest) Ping(count int, isRapid bool, interval int) *common.PingResults
- func (t *TwampLightTest) RemoteAddr() (*net.UDPAddr, error)
- func (t *TwampLightTest) ReturnJSON(r *common.PingResults) string
- func (t *TwampLightTest) Run() (*common.TwampResults, error)
- func (t *TwampLightTest) RunX(count int, callback common.TwampTestCallbackFunction, doneSignal chan bool) *common.PingResults
- func (t *TwampLightTest) SetConnection(connection *net.UDPConn)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MeasurementPacket ¶
type MeasurementPacket struct { Sequence uint32 Timestamp common.TwampTimestamp ErrorEstimate uint16 MBZ uint16 ReceiveTimeStamp common.TwampTimestamp SenderSequence uint32 SenderTimeStamp common.TwampTimestamp SenderErrorEstimate uint16 Mbz uint16 SenderTtl byte }
type TwampLightClient ¶
type TwampLightClient struct{}
func NewLightClient ¶
func NewLightClient() *TwampLightClient
func (*TwampLightClient) Connect ¶
func (c *TwampLightClient) Connect(hostname string, port int) (*TwampLightConnection, error)
type TwampLightConnection ¶
type TwampLightConnection struct {
// contains filtered or unexported fields
}
func NewTwampLightConnection ¶
func NewTwampLightConnection(hostname string, port int) *TwampLightConnection
func (*TwampLightConnection) Close ¶
func (c *TwampLightConnection) Close()
func (*TwampLightConnection) CreateLightSession ¶
func (c *TwampLightConnection) CreateLightSession(config common.TwampSessionConfig) (*TwampLightSession, error)
type TwampLightSession ¶
type TwampLightSession struct {
// contains filtered or unexported fields
}
func (*TwampLightSession) CreateTest ¶
func (s *TwampLightSession) CreateTest() (*TwampLightTest, error)
func (*TwampLightSession) GetConfig ¶
func (s *TwampLightSession) GetConfig() common.TwampSessionConfig
func (*TwampLightSession) Stop ¶
func (s *TwampLightSession) Stop()
type TwampLightTest ¶
type TwampLightTest struct { Session *TwampLightSession Connection *net.UDPConn Sequence uint32 }
TWAMP test connection used for running TWAMP tests.
func (*TwampLightTest) FormatJSON ¶
func (t *TwampLightTest) FormatJSON(r *common.PingResults)
func (*TwampLightTest) GetConnection ¶
func (t *TwampLightTest) GetConnection() *net.UDPConn
Get TWAMP Test UDP connection.
func (*TwampLightTest) GetLocalTestHost ¶
func (t *TwampLightTest) GetLocalTestHost() string
Get the local IP address for the TWAMP control Session.
func (*TwampLightTest) GetRemoteTestHost ¶
func (t *TwampLightTest) GetRemoteTestHost() string
Get the remote IP address for the TWAMP control Session.
func (*TwampLightTest) GetRemoteTestPort ¶
func (t *TwampLightTest) GetRemoteTestPort() int
Get the remote TWAMP UDP port number.
func (*TwampLightTest) GetSession ¶
func (t *TwampLightTest) GetSession() *TwampLightSession
Get the underlying TWAMP control Session for the TWAMP test.
func (*TwampLightTest) Ping ¶
func (t *TwampLightTest) Ping(count int, isRapid bool, interval int) *common.PingResults
func (*TwampLightTest) RemoteAddr ¶
func (t *TwampLightTest) RemoteAddr() (*net.UDPAddr, error)
Get the remote TWAMP IP/UDP address.
func (*TwampLightTest) ReturnJSON ¶
func (t *TwampLightTest) ReturnJSON(r *common.PingResults) string
func (*TwampLightTest) Run ¶
func (t *TwampLightTest) Run() (*common.TwampResults, error)
Run a TWAMP test and return a pointer to the TwampResults.
func (*TwampLightTest) RunX ¶
func (t *TwampLightTest) RunX(count int, callback common.TwampTestCallbackFunction, doneSignal chan bool) *common.PingResults
func (*TwampLightTest) SetConnection ¶
func (t *TwampLightTest) SetConnection(connection *net.UDPConn)
Click to show internal directories.
Click to hide internal directories.