Help us shape the future of Go! Take the 2026 Go Developer Survey

sdk

package
v0.0.48 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package sdk provides a factory method for creating a Docker client.

Index

Constants

View Source
const (
	// DockerSocketEnv is the environment variable for custom Docker socket path
	DockerSocketEnv = "TOOLHIVE_DOCKER_SOCKET"
	// PodmanSocketEnv is the environment variable for custom Podman socket path
	PodmanSocketEnv = "TOOLHIVE_PODMAN_SOCKET"
)

Environment variable names

View Source
const (
	// PodmanSocketPath is the default Podman socket path
	PodmanSocketPath = "/var/run/podman/podman.sock"
	// PodmanXDGRuntimeSocketPath is the XDG runtime Podman socket path
	PodmanXDGRuntimeSocketPath = "podman/podman.sock"
	// DockerSocketPath is the default Docker socket path
	DockerSocketPath = "/var/run/docker.sock"
	// DockerDesktopMacSocketPath is the Docker Desktop socket path on macOS
	DockerDesktopMacSocketPath = ".docker/run/docker.sock"
)

Common socket paths

Variables

View Source
var ErrRuntimeNotFound = fmt.Errorf("container runtime not found")

ErrRuntimeNotFound is returned when a container runtime is not found

Functions

func NewDockerClient

func NewDockerClient(ctx context.Context) (*client.Client, string, runtime.Type, error)

NewDockerClient creates a new container client

Types

This section is empty.

Jump to

Keyboard shortcuts

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