Documentation ¶
Index ¶
- type Message
- type Tnnlr
- func (t *Tnnlr) Add(c *gin.Context)
- func (t *Tnnlr) AddMessage(msg string)
- func (t *Tnnlr) AddTunnel(tnnl Tunnel) error
- func (t *Tnnlr) CleanBookkeepingDirs()
- func (t *Tnnlr) HomepageView(c *gin.Context)
- func (t *Tnnlr) Init()
- func (t *Tnnlr) KillAllTunnels()
- func (t *Tnnlr) Load() ([]Tunnel, error)
- func (t *Tnnlr) ManagedTunnels() map[string]bool
- func (t *Tnnlr) Reload(c *gin.Context)
- func (t *Tnnlr) ReloadOne(c *gin.Context)
- func (t *Tnnlr) Remove(c *gin.Context)
- func (t *Tnnlr) RemoveTunnel(tnnlId string) error
- func (t *Tnnlr) Run()
- func (t *Tnnlr) Save(c *gin.Context)
- func (t *Tnnlr) ShowCommand(c *gin.Context)
- func (t *Tnnlr) ShowLogs(c *gin.Context)
- type Tunnel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Store messages for the user in between views FIXME: Add fields to improve UI
type Tnnlr ¶
type Tnnlr struct { sync.Mutex Template *template.Template SshExec string // path to ssh executable LogLevel string TunnelReloadFile string Port int // contains filtered or unexported fields }
Server
func (*Tnnlr) AddMessage ¶
Add a message to the queue If the channel is full, the message is logged and discarded
func (*Tnnlr) CleanBookkeepingDirs ¶
func (t *Tnnlr) CleanBookkeepingDirs()
Background cleanup and management of jobs
TODO - check cmd and pid information directly to see if process is running instead of checking port - option to leave process running when tnnlr shuts down
func (*Tnnlr) HomepageView ¶
func (*Tnnlr) ManagedTunnels ¶
func (*Tnnlr) RemoveTunnel ¶
Remove a single tunnel Threadsafe Logs errors stopping the process, but continues
func (*Tnnlr) ShowCommand ¶
type Tunnel ¶
type Tunnel struct { Id string `json:"id"` Name string `form:"name" json:"name" binding:"required"` DefaultUrl string `form:"defaultUrl" json:"defaultUrl" binding:"required"` Host string `form:"host" json:"host" binding:"required"` Username string `form:"username" json:"userName"` // can be "" LocalPort int32 `form:"localPort" json:"localPort" binding:"required"` RemotePort int32 `form:"remotePort" json:"remotePort" binding:"required"` Pid int `json:"pid"` // not set until after process starts // contains filtered or unexported fields }
Tunnels
func (*Tunnel) IsAlive ¶
Check if process running the tunnel is alive FIXME: Seems to return true even if process has exited
Click to show internal directories.
Click to hide internal directories.