os

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LaunchConfig

type LaunchConfig struct {

	// Cmd is the entire command line, including options.
	Cmd string

	// SamePgID if true will make the process in the same process group as the launcher so that when the launcher
	// exists the process exits too.
	SamePgID bool
}

LaunchConfig is the rule for how to start up a os process.

type Launcher

type Launcher struct {
	// contains filtered or unexported fields
}

Launcher is a service that implements the launch.Exec interface for starting up os processes.

func NewLauncher

func NewLauncher(n string) (*Launcher, error)

NewLauncher returns a Launcher that can install and start plugins. The OS version is simple - it translates plugin names as command names and uses os.Exec

func (*Launcher) Exec

func (l *Launcher) Exec(name string, config *types.Any) (<-chan error, error)

Exec starts the os process. Returns a signal channel to block on optionally. The channel is closed as soon as an error (or nil for success completion) is written. The command is run in the background / asynchronously. The returned read channel stops blocking as soon as the command completes (which uses shell to run the real task in background).

func (*Launcher) Name

func (l *Launcher) Name() string

Name returns the name of the launcher

Jump to

Keyboard shortcuts

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