converge/pkg/terminal/process.go
Erik Brakkee 75ac9a46f3 * fixes for windows
* detect kill ssh session
* include sftp session in the count of ssh sessions
* log session type in the agent
2024-07-23 19:26:59 +02:00

20 lines
445 B
Go

package terminal
import (
"github.com/gliderlabs/ssh"
"io"
)
type Process interface {
Pipe() io.ReadWriter
Kill() error
Wait() error
}
// A function definition used to start processes
type Spawner func(sshSession ssh.Session, env []string, name string, arg ...string) (Process, error)
func (s Spawner) Start(sshSession ssh.Session, env []string, name string, arg ...string) (Process, error) {
return s(sshSession, env, name, arg...)
}