Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnTracker ¶
type ConnTracker struct {
// contains filtered or unexported fields
}
func NewConnTracker ¶
func NewConnTracker( log *zerolog.Logger, ) *ConnTracker
func (*ConnTracker) CountActiveConns ¶
func (ct *ConnTracker) CountActiveConns() uint
func (*ConnTracker) GetActiveConnections ¶
func (ct *ConnTracker) GetActiveConnections() []IndexedConnectionInfo
Returns the connection information iff it is connected this also leverages the IndexedConnectionInfo to also provide the connection index
func (*ConnTracker) HasConnectedWith ¶
func (ct *ConnTracker) HasConnectedWith(protocol connection.Protocol) bool
HasConnectedWith checks if we've ever had a successful connection to the edge with said protocol.
func (*ConnTracker) OnTunnelEvent ¶
func (ct *ConnTracker) OnTunnelEvent(c connection.Event)
type ConnectionInfo ¶
type ConnectionInfo struct { IsConnected bool `json:"isConnected,omitempty"` Protocol connection.Protocol `json:"protocol,omitempty"` EdgeAddress net.IP `json:"edgeAddress,omitempty"` }
type IndexedConnectionInfo ¶
type IndexedConnectionInfo struct { ConnectionInfo Index uint8 `json:"index,omitempty"` }
Convinience struct to extend the connection with its index.
Click to show internal directories.
Click to hide internal directories.