Documentation
¶
Index ¶
- type ContainerInfo
- type PortInfo
- type Runtime
- func (r *Runtime) CreateContainer(service *types.Service, restartPolicy string) (string, error)
- func (r *Runtime) ListTentContainers() ([]ContainerInfo, error)
- func (r *Runtime) RemoveContainer(containerID string) error
- func (r *Runtime) StartContainer(containerID string) error
- func (r *Runtime) StopContainer(containerID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerInfo ¶
ContainerInfo holds tent-owned container metadata, replacing the Podman entities.ListContainer type.
func FilterContainers ¶
func FilterContainers(tentContainers []ContainerInfo, serviceName string) []ContainerInfo
FilterContainers filters a list of ContainerInfo by service name.
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime holds a Podman connection and exposes methods for container operations.
func Connect ¶
Connect establishes a connection with the Podman System Service and returns a Runtime.
func (*Runtime) CreateContainer ¶
CreateContainer creates a new container for the given service, pulling the image if needed. Returns the container ID and a nil error, or an empty string if the container is already running.
func (*Runtime) ListTentContainers ¶
func (r *Runtime) ListTentContainers() ([]ContainerInfo, error)
ListTentContainers lists all containers started by tent, converting Podman types to ContainerInfo.
func (*Runtime) RemoveContainer ¶
RemoveContainer removes a stopped container.
func (*Runtime) StartContainer ¶
StartContainer starts a container by ID, waiting until it reaches the running state.
func (*Runtime) StopContainer ¶
StopContainer stops a running container by dispatching a SIGTERM signal.