converge/pkg/agent/terminal/process.go
2024-09-08 11:16:49 +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...)
}