runner

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Copyright (c) 2019 Stefaan Coussement MIT License

more info: https://github.com/elebertus/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