zrepl/sshbytestream/ssh.go

28 lines
590 B
Go
Raw Normal View History

2017-04-14 19:26:32 +02:00
package sshbytestream
func Incoming() (io.ReadWriteCloser, error) {
// derivce ReadWriteCloser from stdin & stdout
}
func Outgoing(name string, remote model.SSHTransport) (io.ReadWriteCloser, error) {
// encapsulate
// fork(),exec(ssh $remote zrepl ipc ssh $name)
// stdin and stdout in a ReadWriteCloser
return ForkedSSHReadWriteCloser{}
}
struct ForkedSSHReadWriteCloser {
}
func (f ForkedSSHReadWriteCloser) Read(p []byte) (n int, err error) {
}
func (f ForkedSSHReadWriteCloser) Write(p []byte) (n int, err error) {
}
func (f ForkedSSHReadWriteCloser) Close() error {
}