converge/pkg/terminal/process.go

19 lines
431 B
Go

package terminal
import (
"github.com/gliderlabs/ssh"
"io"
)
type Process interface {
Pipe() io.ReadWriter
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...)
}