Documentation
¶
Overview ¶
Package sealwatcher provides a container watcher.Watcher for Podman engines.
Usage ¶
import "github.com/thediveo/sealwatcher" watcher := sealwatcher.NewWatcher("", nil) // with default backoff
The watcher constructor accepts options, with currently the only option being specifying a container engine's PID. The PID information then can be used downstream in tools like lxkns to translate container PIDs between different PID namespaces.
Notes ¶
This package adds the following Podman-specific "annotation" labels to the discovered containers:
- io.github.thediveo/podman/podname (PodLabelName) – if present, the name of the corresponding pod the container belongs to.
- io.github.thediveo/podman/infra (InfraLabelName) – just the presence of this label marks a container as an “infrastructure” container, its value doesn't matter and must not be relied upon.
Index ¶
Constants ¶
const InfraLabelName = engineclient.InfraLabelName
InfraLabelName is the label key that is present on “infrastructure” containers only; the label value is irrelevant and must not be relied upon.
const PodLabelName = engineclient.PodLabelName
PodLabelName is the label key for the pod name in case a container belongs to a pod.
const Type = engineclient.Type
Type ID of the container engine handled by this watcher.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(podmansock string, buggeroff backoff.BackOff, opts ...engineclient.NewOption) (watcher.Watcher, error)
New returns a watcher.Watcher for keeping track of the currently alive containers, optionally with the composer projects they're associated with.
When the podmansock parameter is left empty then Podman's usual client defaults apply, such as trying to pick it up from the environment or falling back to the local host's "unix:///run/podman/podman.sock".
If the backoff is nil then the backoff defaults to backoff.StopBackOff, that is, any failed operation will never be retried.
Finally, Podman engine client-specific options can be passed in.
Types ¶
This section is empty.
Directories
¶
Path | Synopsis |
---|---|
Package podman implements the [Podman] [engineclient.EngineClient].
|
Package podman implements the [Podman] [engineclient.EngineClient]. |
Package test provides simple Podman client convenience helpers to be used in unit tests.
|
Package test provides simple Podman client convenience helpers to be used in unit tests. |
Package util provides convenience utilities for working with the Podman REST API client.
|
Package util provides convenience utilities for working with the Podman REST API client. |