Esempio n. 1
0
func (y YCmd) Start() (stdin io.WriteCloser, stdout, stderr io.ReadCloser, err error) {
	r := y.Call("Start")
	err = errors.Unpack(r[3])
	if err != nil {
		return nil, nil, nil, err
	}
	return xyio.NewYWriteCloser(r[0]), xyio.NewYReadCloser(r[1]), xyio.NewYReadCloser(r[2]), nil
}
Esempio n. 2
0
func (y YShell) Tail(name string, arg ...string) (stdin io.WriteCloser, stdout, stderr io.ReadCloser, err error) {
	ig := make([]interface{}, 0, len(arg))
	for _, a := range arg {
		ig = append(ig, a)
	}
	r := y.Call("Tail", ig...)
	err = errors.Unpack(r[3])
	if err != nil {
		return nil, nil, nil, err
	}
	return xyio.NewYWriteCloser(r[0]), xyio.NewYReadCloser(r[1]), xyio.NewYReadCloser(r[2]), nil
}
Esempio n. 3
0
func (y YValve) Recv() (_ io.ReadCloser, err error) {
	r := y.X.Call("Recv")
	if err = errors.Unpack(r[1]); err != nil {
		return nil, err
	}
	return xio.NewYReadCloser(r[0]), nil
}
Esempio n. 4
0
File: x.go Progetto: keryoo/circuit
func (y YServer) Profile(name string) (rc io.ReadCloser, err error) {
	r := y.X.Call("Profile", name)
	if err := errors.Unpack(r[1]); err != nil {
		return nil, err
	}
	return xio.NewYReadCloser(r[0]), nil
}
Esempio n. 5
0
File: x.go Progetto: herokai/circuit
func (y YContainer) Stderr() io.ReadCloser {
	return xio.NewYReadCloser(y.X.Call("Stderr")[0])
}
Esempio n. 6
0
func (y YProc) Stdout() io.ReadCloser {
	return xio.NewYReadCloser(y.X.Call("Stdout")[0])
}