Documentation ¶ Index ¶ func Watch(ws *websocket.Conn, timeout time.Duration, handler func() error) error type Agent func (agent *Agent) Start(ctx context.Context) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Watch ¶ func Watch(ws *websocket.Conn, timeout time.Duration, handler func() error) error Watch watches for broken WebSocket connection. This function periodically sends ping message to the websocket peer and invokes `handler` on first timeout. The caller must continuously read something from `ws` to allow pong messages to be received. Types ¶ type Agent ¶ type Agent struct { AuthKey string ServerAddress string EnableTLS bool EnablePprof bool CaFile string CertFile string KeyFile string LocalAddress string } Agent tunnels remote port on a gateway server to local destination. func (*Agent) Start ¶ func (agent *Agent) Start(ctx context.Context) error Start starts Source Files ¶ View all Source files agent.go Click to show internal directories. Click to hide internal directories.