Documentation
¶
Overview ¶
Package tunnel provides an extension over standard library's net.Interface type.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is returned when no tunnel matches the search parameters. ErrNotFound = errors.New("tunnel not found") )
Functions ¶
This section is empty.
Types ¶
type Statistics ¶
Statistics defines what information can be collected about the tunnel
func GetTransferRates ¶
func GetTransferRates(nicName string) (Statistics, error)
GetTransferRates retrieves tunnel statistics in a thread safe manner
type T ¶
type T interface { Interface() net.Interface IP() (netip.Addr, bool) TransferRates() (Statistics, error) AddAddrs() error DelAddrs() error }
T describes tunnel behavior probably needs a better name, though
type Tunnel ¶
type Tunnel struct {
// contains filtered or unexported fields
}
Tunnel encrypts and decrypts network traffic.
func (Tunnel) TransferRates ¶
func (t Tunnel) TransferRates() (Statistics, error)
TransferRates collects data transfer statistics.
Click to show internal directories.
Click to hide internal directories.