github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+incompatible/util/clissh/secure_client.go (about)

     1  package clissh
     2  
     3  import (
     4  	"net"
     5  
     6  	"golang.org/x/crypto/ssh"
     7  )
     8  
     9  type secureClient struct {
    10  	client *ssh.Client
    11  }
    12  
    13  func (sc secureClient) NewSession() (SecureSession, error) {
    14  	return sc.client.NewSession()
    15  }
    16  
    17  func (sc secureClient) Close() error {
    18  	return sc.client.Close()
    19  }
    20  
    21  func (sc secureClient) Dial(n, addr string) (net.Conn, error) {
    22  	return sc.client.Dial(n, addr)
    23  }
    24  
    25  func (sc secureClient) Conn() ssh.Conn {
    26  	return sc.client.Conn
    27  }
    28  
    29  func (sc secureClient) Wait() error {
    30  	return sc.client.Wait()
    31  }