externalcmd

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: MIT Imports: 8 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 {
	Pool    *Pool
	Cmdstr  string
	Restart bool
	Env     Environment
	OnExit  OnExitFunc
	// contains filtered or unexported fields
}

Cmd is an external command.

func (*Cmd) Close

func (c *Cmd) Close()

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

func (*Cmd) Start added in v1.18.1

func (c *Cmd) Start()

Start starts the command.

type Environment

type Environment map[string]string

Environment is a Cmd environment.

type OnExitFunc added in v1.1.0

type OnExitFunc func(error)

OnExitFunc is the prototype of onExit.

type Pool

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

Pool is a pool of external commands.

func (*Pool) Close

func (p *Pool) Close()

Close waits for all external commands to exit.

func (*Pool) Initialize added in v1.12.0

func (p *Pool) Initialize()

Initialize initializes a Pool.

Jump to

Keyboard shortcuts

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