Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TunRegistry ¶ added in v0.6.3
TunRegistry returns a singleton instance of Registry
Types ¶
type Tunnel ¶
type Tunnel struct {
// contains filtered or unexported fields
}
Tunnel object
func NewTunnel ¶
func NewTunnel(sshConn *sshc.SshConnection, conf *TunnelConf, stoppable bool) *Tunnel
NewTunnel builds a Tunnel object
func (*Tunnel) GetActiveClientsCount ¶ added in v0.6.3
GetActiveClientsCount returns how many clients are actually using the tunnel
func (*Tunnel) GetEndpoint ¶ added in v0.6.3
GetEndpoint returns the tunnel endpoint
func (*Tunnel) GetIsListenerLocal ¶ added in v0.6.3
GetIsListenerLocal return true if it is a forward tunnel. In a forward tunnel a socket listener is started on the local (rospo) machine and all the connections are forwarded to the remote endpoint. In a NON forward tunnel, the listener is started on the remote machine instead. When a client connects to the remote listener the connection is forwarded on the local endpoint
func (*Tunnel) GetListenerAddr ¶ added in v0.6.3
GetListenerAddr returns the tunnel listener network address
func (*Tunnel) IsStoppable ¶ added in v0.6.3
IsStoppable return true if the tunnel can be stopped calling the Stop method. False if not
type TunnelConf ¶ added in v0.6.3
type TunnelConf struct { //// Tunnel conf Remote string `yaml:"remote" json:"remote"` Local string `yaml:"local" json:"local"` // indicates if it is a forward or reverse tunnel Forward bool `yaml:"forward" json:"forward"` }
TunnelConf is a struct that holds the tunnel configuration
func (*TunnelConf) GetLocalEndpoint ¶ added in v0.6.3
func (c *TunnelConf) GetLocalEndpoint() *utils.Endpoint
GetLocalEndpoint Builds a locale endpoint object from the Local string
func (*TunnelConf) GetRemotEndpoint ¶ added in v0.6.3
func (c *TunnelConf) GetRemotEndpoint() *utils.Endpoint
GetRemotEndpoint Builds a remote endpoint object from the Remote string