Example #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
}
Example #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
}
Example #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
}
Example #4
0
File: x.go Project: 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
}
Example #5
0
File: x.go Project: herokai/circuit
func (y YContainer) Stderr() io.ReadCloser {
	return xio.NewYReadCloser(y.X.Call("Stderr")[0])
}
Example #6
0
func (y YProc) Stdout() io.ReadCloser {
	return xio.NewYReadCloser(y.X.Call("Stdout")[0])
}