dockerutils

package
v0.414.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommandExecutorDocker

func GetCommandExecutorDocker(commandExecutor commandexecutorinterfaces.CommandExecutor) (docker dockerinterfaces.Docker, err error)

func GetCommandExecutorDockerOnHost

func GetCommandExecutorDockerOnHost(host hosts.Host) (docker dockerinterfaces.Docker, err error)

func GetDockerContainerOnHost

func GetDockerContainerOnHost(host hosts.Host, containerName string) (dockerContainer containerinterfaces.Container, err error)

func GetDockerOnHost

func GetDockerOnHost(host hosts.Host) (docker dockerinterfaces.Docker, err error)

func GetDockerOnLocalHost added in v0.341.0

func GetDockerOnLocalHost() (dockerinterfaces.Docker, error)

func GetLocalCommandExecutorDocker

func GetLocalCommandExecutorDocker() (docker dockerinterfaces.Docker, err error)

func ListContainerNames added in v0.341.0

func ListContainerNames(ctx context.Context) ([]string, error)

func MustGetCommandExecutorDocker

func MustGetCommandExecutorDocker(commandExecutor commandexecutorinterfaces.CommandExecutor) (docker dockerinterfaces.Docker)

func MustGetCommandExecutorDockerOnHost

func MustGetCommandExecutorDockerOnHost(host hosts.Host) (docker dockerinterfaces.Docker)

func MustGetDockerContainerOnHost

func MustGetDockerContainerOnHost(host hosts.Host, containerName string) (dockerContainer containerinterfaces.Container)

func MustGetDockerOnHost

func MustGetDockerOnHost(host hosts.Host) (docker dockerinterfaces.Docker)

func MustGetLocalCommandExecutorDocker

func MustGetLocalCommandExecutorDocker() (docker dockerinterfaces.Docker)

func MustGetcommandExecutorDocker

func MustGetcommandExecutorDocker(commandExecutor commandexecutorinterfaces.CommandExecutor) (docker dockerinterfaces.Docker)

Types

type CommandExecutorDocker

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

func NewCommandExecutorDocker

func NewCommandExecutorDocker() (c *CommandExecutorDocker)

func (*CommandExecutorDocker) GetCommandExecutor

func (c *CommandExecutorDocker) GetCommandExecutor() (commandExecutor commandexecutorinterfaces.CommandExecutor, err error)

func (*CommandExecutorDocker) GetContainerById added in v0.341.0

func (c *CommandExecutorDocker) GetContainerById(id string) (containerinterfaces.Container, error)

func (*CommandExecutorDocker) GetContainerByName

func (c *CommandExecutorDocker) GetContainerByName(containerName string) (dockerContainer containerinterfaces.Container, err error)

func (*CommandExecutorDocker) GetHost

func (c *CommandExecutorDocker) GetHost() (host hosts.Host, err error)

func (*CommandExecutorDocker) GetHostDescription

func (c *CommandExecutorDocker) GetHostDescription() (hostDescription string, err error)

func (*CommandExecutorDocker) IsHostSet

func (c *CommandExecutorDocker) IsHostSet() (isSet bool)

func (*CommandExecutorDocker) KillContainerByName

func (c *CommandExecutorDocker) KillContainerByName(ctx context.Context, name string) (err error)

func (*CommandExecutorDocker) ListContainerNames added in v0.341.0

func (c *CommandExecutorDocker) ListContainerNames(ctx context.Context) ([]string, error)

func (*CommandExecutorDocker) ListContainers added in v0.341.0

func (*CommandExecutorDocker) RunCommand

func (c *CommandExecutorDocker) RunCommand(ctx context.Context, runOptions *parameteroptions.RunCommandOptions) (commandOutput *commandoutput.CommandOutput, err error)

func (*CommandExecutorDocker) RunCommandAndGetStdoutAsString

func (c *CommandExecutorDocker) RunCommandAndGetStdoutAsString(ctx context.Context, runOptions *parameteroptions.RunCommandOptions) (stdout string, err error)

func (*CommandExecutorDocker) RunContainer

func (c *CommandExecutorDocker) RunContainer(ctx context.Context, runOptions *DockerRunContainerOptions) (startedContainer containerinterfaces.Container, err error)

func (*CommandExecutorDocker) SetHost

func (c *CommandExecutorDocker) SetHost(host hosts.Host) (err error)

type CommandExecutorDockerContainer

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

func NewCommandExecutorDockerContainer

func NewCommandExecutorDockerContainer() (c *CommandExecutorDockerContainer)

func (*CommandExecutorDockerContainer) GetCachedName added in v0.341.0

func (d *CommandExecutorDockerContainer) GetCachedName() (string, error)

func (*CommandExecutorDockerContainer) GetCommandExecutor

func (c *CommandExecutorDockerContainer) GetCommandExecutor() (commandExectuor commandexecutorinterfaces.CommandExecutor, err error)

func (*CommandExecutorDockerContainer) GetDocker

func (d *CommandExecutorDockerContainer) GetDocker() (docker dockerinterfaces.Docker, err error)

func (*CommandExecutorDockerContainer) GetName

func (c *CommandExecutorDockerContainer) GetName() (name string, err error)

func (*CommandExecutorDockerContainer) IsRunning

func (c *CommandExecutorDockerContainer) IsRunning(ctx context.Context) (isRunning bool, err error)

func (*CommandExecutorDockerContainer) Kill

func (*CommandExecutorDockerContainer) RunCommand

func (*CommandExecutorDockerContainer) RunCommandAndGetStdoutAsString

func (c *CommandExecutorDockerContainer) RunCommandAndGetStdoutAsString(ctx context.Context, runOptions *parameteroptions.RunCommandOptions) (stdout string, err error)

func (*CommandExecutorDockerContainer) SetCachedName added in v0.341.0

func (c *CommandExecutorDockerContainer) SetCachedName(cachedName string) (err error)

func (*CommandExecutorDockerContainer) SetDocker

func (d *CommandExecutorDockerContainer) SetDocker(docker dockerinterfaces.Docker) (err error)

func (*CommandExecutorDockerContainer) SetId added in v0.341.0

func (c *CommandExecutorDockerContainer) SetId(id string) (err error)

func (*CommandExecutorDockerContainer) SetName

func (c *CommandExecutorDockerContainer) SetName(name string) (err error)

type DockerRunContainerOptions

type DockerRunContainerOptions struct {
	ImageName               string
	Name                    string
	Command                 []string
	Ports                   []string
	Mounts                  []string
	KeepStoppedContainer    bool
	Verbose                 bool
	VerboseDockerRunCommand bool
	UseHostNet              bool
}

func NewDockerRunContainerOptions

func NewDockerRunContainerOptions() (d *DockerRunContainerOptions)

func (*DockerRunContainerOptions) GetCommand

func (d *DockerRunContainerOptions) GetCommand() (command []string, err error)

func (*DockerRunContainerOptions) GetImageName

func (o *DockerRunContainerOptions) GetImageName() (imageName string, err error)

func (*DockerRunContainerOptions) GetKeepStoppedContainer

func (d *DockerRunContainerOptions) GetKeepStoppedContainer() (keepStoppedContainer bool, err error)

func (*DockerRunContainerOptions) GetMounts

func (d *DockerRunContainerOptions) GetMounts() (mounts []string, err error)

func (*DockerRunContainerOptions) GetName

func (o *DockerRunContainerOptions) GetName() (name string, err error)

func (*DockerRunContainerOptions) GetPorts

func (d *DockerRunContainerOptions) GetPorts() (ports []string, err error)

func (*DockerRunContainerOptions) GetUseHostNet

func (d *DockerRunContainerOptions) GetUseHostNet() (useHostNet bool, err error)

func (*DockerRunContainerOptions) GetVerbose

func (d *DockerRunContainerOptions) GetVerbose() (verbose bool, err error)

func (*DockerRunContainerOptions) GetVerboseDockerRunCommand

func (d *DockerRunContainerOptions) GetVerboseDockerRunCommand() (verboseDockerRunCommand bool, err error)

func (*DockerRunContainerOptions) MustGetCommand

func (d *DockerRunContainerOptions) MustGetCommand() (command []string)

func (*DockerRunContainerOptions) MustGetImageName

func (d *DockerRunContainerOptions) MustGetImageName() (imageName string)

func (*DockerRunContainerOptions) MustGetKeepStoppedContainer

func (d *DockerRunContainerOptions) MustGetKeepStoppedContainer() (keepStoppedContainer bool)

func (*DockerRunContainerOptions) MustGetMounts

func (d *DockerRunContainerOptions) MustGetMounts() (mounts []string)

func (*DockerRunContainerOptions) MustGetName

func (d *DockerRunContainerOptions) MustGetName() (name string)

func (*DockerRunContainerOptions) MustGetPorts

func (d *DockerRunContainerOptions) MustGetPorts() (ports []string)

func (*DockerRunContainerOptions) MustGetUseHostNet

func (d *DockerRunContainerOptions) MustGetUseHostNet() (useHostNet bool)

func (*DockerRunContainerOptions) MustGetVerbose

func (d *DockerRunContainerOptions) MustGetVerbose() (verbose bool)

func (*DockerRunContainerOptions) MustGetVerboseDockerRunCommand

func (d *DockerRunContainerOptions) MustGetVerboseDockerRunCommand() (verboseDockerRunCommand bool)

func (*DockerRunContainerOptions) MustSetCommand

func (d *DockerRunContainerOptions) MustSetCommand(command []string)

func (*DockerRunContainerOptions) MustSetImageName

func (d *DockerRunContainerOptions) MustSetImageName(imageName string)

func (*DockerRunContainerOptions) MustSetKeepStoppedContainer

func (d *DockerRunContainerOptions) MustSetKeepStoppedContainer(keepStoppedContainer bool)

func (*DockerRunContainerOptions) MustSetMounts

func (d *DockerRunContainerOptions) MustSetMounts(mounts []string)

func (*DockerRunContainerOptions) MustSetName

func (d *DockerRunContainerOptions) MustSetName(name string)

func (*DockerRunContainerOptions) MustSetPorts

func (d *DockerRunContainerOptions) MustSetPorts(ports []string)

func (*DockerRunContainerOptions) MustSetUseHostNet

func (d *DockerRunContainerOptions) MustSetUseHostNet(useHostNet bool)

func (*DockerRunContainerOptions) MustSetVerbose

func (d *DockerRunContainerOptions) MustSetVerbose(verbose bool)

func (*DockerRunContainerOptions) MustSetVerboseDockerRunCommand

func (d *DockerRunContainerOptions) MustSetVerboseDockerRunCommand(verboseDockerRunCommand bool)

func (*DockerRunContainerOptions) SetCommand

func (d *DockerRunContainerOptions) SetCommand(command []string) (err error)

func (*DockerRunContainerOptions) SetImageName

func (d *DockerRunContainerOptions) SetImageName(imageName string) (err error)

func (*DockerRunContainerOptions) SetKeepStoppedContainer

func (d *DockerRunContainerOptions) SetKeepStoppedContainer(keepStoppedContainer bool) (err error)

func (*DockerRunContainerOptions) SetMounts

func (d *DockerRunContainerOptions) SetMounts(mounts []string) (err error)

func (*DockerRunContainerOptions) SetName

func (d *DockerRunContainerOptions) SetName(name string) (err error)

func (*DockerRunContainerOptions) SetPorts

func (d *DockerRunContainerOptions) SetPorts(ports []string) (err error)

func (*DockerRunContainerOptions) SetUseHostNet

func (d *DockerRunContainerOptions) SetUseHostNet(useHostNet bool) (err error)

func (*DockerRunContainerOptions) SetVerbose

func (d *DockerRunContainerOptions) SetVerbose(verbose bool) (err error)

func (*DockerRunContainerOptions) SetVerboseDockerRunCommand

func (d *DockerRunContainerOptions) SetVerboseDockerRunCommand(verboseDockerRunCommand bool) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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