runner

package
v0.0.0-...-c76b3c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2019 License: MIT Imports: 7 Imported by: 2

Documentation

Overview

Copyright (c) 2019 Stefaan Coussement MIT License

more info: https://github.com/stefaanc/golang-exec

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(connection interface{}, s *script.Script, arguments interface{}, stdout, stderr io.Writer) error

Types

type Error

type Error interface {
	Script() *script.Script
	Command() string
	ExitCode() int // -1 when runner error without completing script
	Error() string
	Unwrap() error
}

type Runner

type Runner interface {
	SetStdoutWriter(io.Writer)
	SetStderrWriter(io.Writer)
	StdoutPipe() (io.Reader, error) // use in combination with Start() & Wait(), don't use in combination with Run()
	StderrPipe() (io.Reader, error) // use in combination with Start() & Wait(), don't use in combination with Run()

	Run() error
	Start() error
	Wait() error
	Close() error

	ExitCode() int // -1 when runner error without completing script
}

func New

func New(connection interface{}, s *script.Script, arguments interface{}) (Runner, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL