Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dialer ¶
type Dialer struct { // OnDial is a listener that may be set to track openning SSH connection to // the remote host. It is called for both successful and failed trials. OnDial func(host string, err error) // OnConnClose is a listener that may be set to track closing of SSH // connection. OnConnClose func(host string) // contains filtered or unexported fields }
Dialer allows for proxying connections over SSH. It can be used with HTTP client to allow communication with a HTTP shell using Listener and serving HTTP request over stdin and stdout.
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener is a net.Listener that accepts only a single connection that uses the given reader and writer. It's intended to be used with http.Server, it can then expose http.Handlers over all sorts of transports.
After accepting the first connection any calls to Accept will block until the connection is closed, then they will end immediately with io.EOF error. This is needed to block http.Server main loop and avoid termination of the golden connection.
func NewListener ¶
func NewListener(w io.Writer, r io.ReadCloser) *Listener