process

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2018 License: Apache-2.0 Imports: 13 Imported by: 21

Documentation

Overview

Package process has helper code for managing server processes and connections to them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(port int, authToken auth.Token) (net.Conn, error)

func Start

func Start(ctx context.Context, name string, opts StartOptions) (int, error)

Start runs the application with the given path and options, waits for the "Bound on port {port}" string to be printed to stdout, and then returns the port number.

Types

type StartOptions

type StartOptions struct {
	// Command line arguments for starting the process.
	Args []string

	// Environment variables for starting the process.
	Env *shell.Env

	// Standard output pipe for the new process.
	Stdout io.Writer

	// Standard error pipe for the new process.
	Stderr io.Writer

	// Should all stderr and and stdout also be logged to the logger?
	Verbose bool

	// PortFile, if not "", is a file that can be search if we can
	// not find the output on stdout
	PortFile string

	// If not "", the working directory for this command
	WorkingDir string
}

StartOptions holds the options that can be passed to Start.

Jump to

Keyboard shortcuts

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