nginx

package
v1.4.15 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackFn

type CallbackFn func([]byte)

Callback output from the command. Newlines are embedded and should be removed

type Cmd

type Cmd struct {

	// Stdout callback function
	Out CallbackFn

	// Stderr callback function
	Err CallbackFn

	// The time the command was started
	Start time.Time

	// The time the command was stopped
	Stop time.Time
	// contains filtered or unexported fields
}

Cmd represents the lifecycle of a command

func New

func New(cmd string, args ...string) (*Cmd, error)

Create a new command with arguments

func (*Cmd) Exited

func (c *Cmd) Exited() bool

Return whether command has exited

func (*Cmd) Path

func (c *Cmd) Path() string

Path returns the path of the executable

func (*Cmd) Pid

func (c *Cmd) Pid() int

Return the pid of the process or 0

func (*Cmd) Run

func (c *Cmd) Run() error

Run the command in the foreground, and return any errors

func (*Cmd) SetArgs

func (c *Cmd) SetArgs(args ...string)

SetArgs appends arguments for the command

func (*Cmd) SetDir

func (c *Cmd) SetDir(dir string)

SetDir sets the working directory for the command

func (*Cmd) SetEnv

func (c *Cmd) SetEnv(env map[string]string) error

SetEnv appends the environment variables for the command

func (*Cmd) Signal

func (c *Cmd) Signal(s os.Signal) error

Send signal to the process

Jump to

Keyboard shortcuts

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