package bridge

Import Path
	github.com/limanmys/render-engine/internal/bridge (on go.dev)

Dependency Relation
	imports 26 packages, and imported by 4 packages


Package-Level Type Names (total 4)
/* sort by: | */
Connections map[string]*Session Mutex sync.Mutex Delete connection object from pool Get connection from pool GetRaw connection object from pool Lock locks m. If the lock is already in use, the calling goroutine blocks until the mutex is available. Set connection on pool SetRaw connection object on pool TryLock tries to lock m and reports whether it succeeded. Note that while correct uses of TryLock do exist, they are rare, and use of TryLock is often a sign of a deeper problem in a particular use of mutexes. Unlock unlocks m. It is a run-time error if m is not locked on entry to Unlock. A locked Mutex is not associated with a particular goroutine. It is allowed for one goroutine to lock a Mutex and then arrange for another goroutine to unlock it. *Pool : sync.Locker var Sessions
IpAddr string LastConnection time.Time Mutex sync.Mutex Port string SFTP *sftp.Client SMB *smb2.Session SSH *ssh.Client SSHSession *ssh.Client Username string WinRM *winrm.Client WindowsLetter string WindowsPath string CloseAllConnections closes all connections on session CreateFileSesssion creates a new file session with credential type and sets it on session CreateRaw creates a new raw shell with credential type and sets it on session CreateShell creates a new shell with credential type and sets it on session Get downloads file to local path Lock locks m. If the lock is already in use, the calling goroutine blocks until the mutex is available. Put sends file to a remote path Run runs command on sessions SSH and returns output SftpGetFile downloads file from remote path SftpPutFile uploads file on remote path SmbGetFile downloads file from remote path to local path SmbPutFile uploads file from local path to remote path TryLock tries to lock m and reports whether it succeeded. Note that while correct uses of TryLock do exist, they are rare, and use of TryLock is often a sign of a deeper problem in a particular use of mutexes. Unlock unlocks m. It is a run-time error if m is not locked on entry to Unlock. A locked Mutex is not associated with a particular goroutine. It is allowed for one goroutine to lock a Mutex and then arrange for another goroutine to unlock it. *Session : sync.Locker func GetSession(userID, serverID, host string) (*Session, error) func (*Pool).Get(userID, serverID string) (*Session, error) func (*Pool).GetRaw(userID, remoteHost, username string) (*Session, error) func (*Pool).Set(userID, serverID string, session *Session) func (*Pool).SetRaw(userID, remoteHost, username string, session *Session)
LastConnection time.Time Mutex sync.Mutex Port int SshClient *ssh.Client Started bool Lock locks m. If the lock is already in use, the calling goroutine blocks until the mutex is available. Start starts binding to remote end and return error if exists any Stop collapses tunnel String returns readable format of tunnel struct TryLock tries to lock m and reports whether it succeeded. Note that while correct uses of TryLock do exist, they are rare, and use of TryLock is often a sign of a deeper problem in a particular use of mutexes. Unlock unlocks m. It is a run-time error if m is not locked on entry to Unlock. A locked Mutex is not associated with a particular goroutine. It is allowed for one goroutine to lock a Mutex and then arrange for another goroutine to unlock it. *Tunnel : github.com/ChrisTrenkamp/goxpath/tree.Result *Tunnel : fmt.Stringer *Tunnel : sync.Locker func (*TunnelPool).Get(remoteHost, remotePort, username string) (*Tunnel, error) func (*TunnelPool).Set(remoteHost, remotePort, username string, tunnel *Tunnel)
Connections map[string]*Tunnel Mutex sync.Mutex Delete Tunnel connection from pool Get Tunnel connection from pool Lock locks m. If the lock is already in use, the calling goroutine blocks until the mutex is available. Set Tunnel connection to pool TryLock tries to lock m and reports whether it succeeded. Note that while correct uses of TryLock do exist, they are rare, and use of TryLock is often a sign of a deeper problem in a particular use of mutexes. Unlock unlocks m. It is a run-time error if m is not locked on entry to Unlock. A locked Mutex is not associated with a particular goroutine. It is allowed for one goroutine to lock a Mutex and then arrange for another goroutine to unlock it. *TunnelPool : sync.Locker var Tunnels
Package-Level Functions (total 12)
Clean clears long standing sessions from memory
CreateTunnel starts a new tunnel instance and sets it into TunnelPool
GetSession gets session from memory and if does not exists creates a new one
InitShellWithCert creates a SSH shell with certificate
InitShellWithPassword creates a SSH shell with password
InitWinRm creates a new WinRM client and returns it
OpenSFTPConnection creates a new SFTP connection
OpenSmbConnection creates a new smb connection session
VerifyAuth verifies key when connecting
VerifySSH checks if remote end is active or not
VerifySSHCertificate checks if remote end is active or not
VerifyWinRm checks if WinRM authentication is valid to remote end
Package-Level Variables (total 2)