externalcmd

package
v0.23.5 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package externalcmd allows to launch external commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

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

Cmd is an external command.

func NewCmd

func NewCmd(
	pool *Pool,
	cmdstr string,
	restart bool,
	env Environment,
	onExit func(error),
) *Cmd

NewCmd allocates a Cmd.

func (*Cmd) Close

func (e *Cmd) Close()

Close closes the command. It doesn't wait for the command to exit.

type Environment

type Environment map[string]string

Environment is a Cmd environment.

type Pool

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

Pool is a pool of external commands.

func NewPool

func NewPool() *Pool

NewPool allocates a Pool.

func (*Pool) Close

func (p *Pool) Close()

Close waits for all external commands to exit.

Jump to

Keyboard shortcuts

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