Documentation
¶
Overview ¶
Package podman implements the ContainerEngine interface backed by the Podman daemon. Podman exposes a Docker-compatible API, so this engine is a thin wrapper over the Docker engine adapter pointed at the Podman socket.
Index ¶
- Constants
- type Engine
- func (e *Engine) AreMicroserviceAndContainerEqual(id string, ms *models.Microservice) bool
- func (e *Engine) Close() error
- func (e *Engine) CreateContainer(ms *models.Microservice, h string) (string, error)
- func (e *Engine) CreateExecSession(id string, cmd []string) (string, error)
- func (e *Engine) DeleteImage(ctx context.Context, nameOrID string) error
- func (e *Engine) EnsureNetwork(name string) error
- func (e *Engine) FindLocalImage(ref string) (bool, error)
- func (e *Engine) GetAllContainers() ([]engine.Container, error)
- func (e *Engine) GetContainer(u string) (*engine.Container, error)
- func (e *Engine) GetContainerByID(id string) (*engine.Container, error)
- func (e *Engine) GetContainerIPAddress(id string) (string, error)
- func (e *Engine) GetContainerMicroserviceUUID(c engine.Container) string
- func (e *Engine) GetContainerName(c engine.Container) string
- func (e *Engine) GetContainerSandboxID(id string) (string, error)
- func (e *Engine) GetContainerStartedAt(id string) (int64, error)
- func (e *Engine) GetContainerStats(id string) (*engine.ContainerStats, error)
- func (e *Engine) GetContainerStatus(id, uuid string) (*models.MicroserviceStatus, error)
- func (e *Engine) GetExecSessionExitCode(execID string) (int, error)
- func (e *Engine) GetExecSessionStatus(execID string) (bool, error)
- func (e *Engine) GetRunningContainers() ([]engine.Container, error)
- func (e *Engine) Init(cfg engine.EngineConfig) error
- func (e *Engine) InspectContainerRaw(containerID string) (map[string]any, error)
- func (e *Engine) KillContainer(id string) error
- func (e *Engine) ListImages(ctx context.Context) ([]engine.ImageInfo, error)
- func (e *Engine) LoadImageFromPath(ctx context.Context, archivePath string) ([]engine.LoadedImage, error)
- func (e *Engine) PruneContainers(ctx context.Context) (*engine.ContainerPruneReport, error)
- func (e *Engine) PruneDangling(ctx context.Context) (*engine.ImagePruneReport, error)
- func (e *Engine) PruneImages() error
- func (e *Engine) PruneVolumes(ctx context.Context) (*engine.VolumePruneReport, error)
- func (e *Engine) PullImage(ref string, reg *models.Registry, opts *engine.PullImageOptions) error
- func (e *Engine) RemoveContainer(id string, v bool) error
- func (e *Engine) RemoveImage(ref string) error
- func (e *Engine) RemoveNamedVolume(ctx context.Context, name string) error
- func (e *Engine) ResizeExecSession(execID string, cols, rows uint32) error
- func (e *Engine) StartContainer(id string) error
- func (e *Engine) StartExecSession(execID string, stdin io.Reader, stdout, stderr io.Writer) error
- func (e *Engine) StopContainer(id string) error
- func (e *Engine) StopExecSession(execID string) error
- func (e *Engine) TailContainerLogs(id, sid, uuid string, h engine.LogTailHandler, cfg *engine.TailConfig) error
Constants ¶
View Source
const ( // DefaultPodmanSocket is the default Podman socket path for the root user. DefaultPodmanSocket = "unix:///run/podman/podman.sock" // DefaultPodmanUserSocket is the default Podman socket for rootless installs. DefaultPodmanUserSocket = "unix:///run/user/0/podman/podman.sock" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine implements engine.ContainerEngine using the Podman daemon via its Docker-compatible socket API.
func (*Engine) AreMicroserviceAndContainerEqual ¶
func (e *Engine) AreMicroserviceAndContainerEqual(id string, ms *models.Microservice) bool
func (*Engine) CreateContainer ¶
func (*Engine) CreateExecSession ¶
func (*Engine) DeleteImage ¶
func (*Engine) EnsureNetwork ¶
func (*Engine) GetContainerByID ¶
func (*Engine) GetContainerIPAddress ¶
func (*Engine) GetContainerMicroserviceUUID ¶
func (*Engine) GetContainerSandboxID ¶
func (*Engine) GetContainerStartedAt ¶
func (*Engine) GetContainerStats ¶
func (e *Engine) GetContainerStats(id string) (*engine.ContainerStats, error)
func (*Engine) GetContainerStatus ¶
func (e *Engine) GetContainerStatus(id, uuid string) (*models.MicroserviceStatus, error)
func (*Engine) GetExecSessionExitCode ¶
func (*Engine) GetExecSessionStatus ¶
func (*Engine) GetRunningContainers ¶
func (*Engine) Init ¶
func (e *Engine) Init(cfg engine.EngineConfig) error
Init connects to the Podman socket. If cfg.SocketURL is empty it auto-detects the Podman socket by trying the root socket and the rootless socket in order.
func (*Engine) InspectContainerRaw ¶
func (*Engine) KillContainer ¶
func (*Engine) ListImages ¶
func (*Engine) LoadImageFromPath ¶
func (*Engine) PruneContainers ¶
func (*Engine) PruneDangling ¶
func (*Engine) PruneImages ¶
func (*Engine) PruneVolumes ¶
func (*Engine) RemoveImage ¶
func (*Engine) RemoveNamedVolume ¶
func (*Engine) ResizeExecSession ¶
func (*Engine) StartContainer ¶
func (*Engine) StartExecSession ¶
func (*Engine) StopContainer ¶
func (*Engine) StopExecSession ¶
func (*Engine) TailContainerLogs ¶
func (e *Engine) TailContainerLogs(id, sid, uuid string, h engine.LogTailHandler, cfg *engine.TailConfig) error
Click to show internal directories.
Click to hide internal directories.