package exec

import "github.com/testcontainers/testcontainers-go/exec"

Index

Types

type ProcessOption

type ProcessOption interface {
	Apply(opts *ProcessOptions)
}

ProcessOption defines a common interface to modify the reader processor These options can be passed to the Exec function in a variadic way to customize the returned Reader instance

func Multiplexed

func Multiplexed() ProcessOption

Multiplexed returns a ProcessOption that configures the command execution to combine stdout and stderr into a single stream without Docker's multiplexing headers.

func WithEnv

func WithEnv(env []string) ProcessOption

func WithUser

func WithUser(user string) ProcessOption

func WithWorkingDir

func WithWorkingDir(workingDir string) ProcessOption

type ProcessOptionFunc

type ProcessOptionFunc func(opts *ProcessOptions)

func (ProcessOptionFunc) Apply

func (fn ProcessOptionFunc) Apply(opts *ProcessOptions)

type ProcessOptions

type ProcessOptions struct {
	ExecConfig container.ExecOptions
	Reader     io.Reader
}

ProcessOptions defines options applicable to the reader processor

func NewProcessOptions

func NewProcessOptions(cmd []string) *ProcessOptions

NewProcessOptions returns a new ProcessOptions instance with the given command and default options: - detach: false - attach stdout: true - attach stderr: true

Source Files

processor.go

Version
v0.36.0 (latest)
Published
Mar 27, 2025
Platform
linux/amd64
Imports
6 packages
Last checked
3 hours ago

Tools for package owners.