engine

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package engine provides functionality for creating a Docker client.

Package engine provides functionality for detecting and interacting with container engines (Docker/Podman).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnginePath

func GetEnginePath() string

GetEnginePath returns the absolute path to the detected engine binary.

func NewClient

func NewClient() (*client.Client, error)

NewClient creates a new Docker client.

func RunEngineCommand

func RunEngineCommand(args ...string) (string, string, error)

RunEngineCommand executes a command using the detected container engine. It returns the stdout, stderr, and any error encountered during execution.

Types

type EngineType

type EngineType string

EngineType represents the type of container engine detected.

const (
	// Docker represents the Docker container engine.
	Docker EngineType = "docker"
	// Podman represents the Podman container engine.
	Podman EngineType = "podman"
	// Unknown represents an unknown or undetected container engine.
	Unknown EngineType = "unknown"
)

func DetectEngine

func DetectEngine() EngineType

DetectEngine returns the detected engine type.

Jump to

Keyboard shortcuts

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