osexec

package
v0.1.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package osexec implements subprocess execution functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(cmd string, args []string, env []string, logger log.Logger) ([]byte, error)

Execute command and return stdout/stderr

func ExecuteAs

func ExecuteAs(cmd string, args []string, uid int, gid int, env []string, logger log.Logger) ([]byte, error)

ExecuteAs executes a command as a given UID and GID and return stdout/stderr

func ExecuteAsWithTimeout

func ExecuteAsWithTimeout(
	cmd string,
	args []string,
	uid int,
	gid int,
	timeout int,
	env []string,
	logger log.Logger,
) ([]byte, error)

ExecuteAsWithTimeout executes a command with timeout as a given UID and GID and return stdout/stderr

func ExecuteWithTimeout

func ExecuteWithTimeout(cmd string, args []string, timeout int, env []string, logger log.Logger) ([]byte, error)

ExecuteWithTimeout exwecutes a command with timeout and return stdout/stderr

Types

This section is empty.

Jump to

Keyboard shortcuts

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