Documentation
¶
Overview ¶
Package main is the watchtower entry point. It delegates to the Cobra command tree in cmd.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package cmd contains the watchtower (sub-)commands.
|
Package cmd contains the watchtower (sub-)commands. |
|
internal
|
|
|
actions
Package actions orchestrates the high-level watchtower update flow: listing containers, running sanity and duplicate-instance checks, and driving the stop/start sequence through pkg/container.
|
Package actions orchestrates the high-level watchtower update flow: listing containers, running sanity and duplicate-instance checks, and driving the stop/start sequence through pkg/container. |
|
events
Package events bridges Docker engine image events to targeted watchtower scans, so local `docker build` / `docker load` rebuilds trigger an update without waiting for the next scheduled poll.
|
Package events bridges Docker engine image events to targeted watchtower scans, so local `docker build` / `docker load` rebuilds trigger an update without waiting for the next scheduled poll. |
|
flags
Package flags defines watchtower's CLI flag set and the viper-backed environment-variable bindings that accompany it.
|
Package flags defines watchtower's CLI flag set and the viper-backed environment-variable bindings that accompany it. |
|
meta
Package meta holds build-time metadata populated via -ldflags.
|
Package meta holds build-time metadata populated via -ldflags. |
|
util
Package util contains small utility helpers shared across watchtower.
|
Package util contains small utility helpers shared across watchtower. |
|
pkg
|
|
|
api
Package api hosts the HTTP control-plane for watchtower (token auth, /v1/update, /v1/metrics).
|
Package api hosts the HTTP control-plane for watchtower (token auth, /v1/update, /v1/metrics). |
|
api/audit
Package audit exposes the HTTP handler for the /v1/audit endpoint.
|
Package audit exposes the HTTP handler for the /v1/audit endpoint. |
|
api/metrics
Package metrics exposes the Prometheus /v1/metrics HTTP handler.
|
Package metrics exposes the Prometheus /v1/metrics HTTP handler. |
|
api/update
Package update exposes the HTTP handler for the /v1/update API endpoint.
|
Package update exposes the HTTP handler for the /v1/update API endpoint. |
|
container
Package container contains code related to dealing with docker containers
|
Package container contains code related to dealing with docker containers |
|
filters
Package filters composes container predicates for selecting update targets.
|
Package filters composes container predicates for selecting update targets. |
|
lifecycle
Package lifecycle runs user-defined pre/post check and update commands (configured via com.centurylinklabs.watchtower.lifecycle.* labels) inside target containers.
|
Package lifecycle runs user-defined pre/post check and update commands (configured via com.centurylinklabs.watchtower.lifecycle.* labels) inside target containers. |
|
metrics
Package metrics collects watchtower scan statistics and exports them via prometheus counters/gauges consumed by the /v1/metrics API.
|
Package metrics collects watchtower scan statistics and exports them via prometheus counters/gauges consumed by the /v1/metrics API. |
|
notifications
Package notifications sends watchtower session outcomes through shoutrrr (and legacy email/slack/msteams/gotify shims) using configurable templates.
|
Package notifications sends watchtower session outcomes through shoutrrr (and legacy email/slack/msteams/gotify shims) using configurable templates. |
|
notifications/templates
Package templates contains the text/template function map used by notification templates.
|
Package templates contains the text/template function map used by notification templates. |
|
registry
Package registry authenticates to container image registries and resolves remote image digests used by the stale-check logic.
|
Package registry authenticates to container image registries and resolves remote image digests used by the stale-check logic. |
|
registry/auth
Package auth handles registry authentication and bearer-token challenges.
|
Package auth handles registry authentication and bearer-token challenges. |
|
registry/digest
Package digest compares the current image digest to the latest one published in the registry to decide whether a container is stale.
|
Package digest compares the current image digest to the latest one published in the registry to decide whether a container is stale. |
|
registry/helpers
Package helpers holds registry-address resolution helpers shared across the registry sub-packages.
|
Package helpers holds registry-address resolution helpers shared across the registry sub-packages. |
|
registry/manifest
Package manifest builds registry manifest URLs for digest lookups.
|
Package manifest builds registry manifest URLs for digest lookups. |
|
registry/retry
Package retry wraps registry HTTP requests in a bounded exponential backoff so a single flaky oauth/manifest response doesn't wedge an image for a full poll interval.
|
Package retry wraps registry HTTP requests in a bounded exponential backoff so a single flaky oauth/manifest response doesn't wedge an image for a full poll interval. |
|
registry/transport
Package transport builds the http.Client used for registry API calls.
|
Package transport builds the http.Client used for registry API calls. |
|
session
Package session tracks container state and outcomes for a single watchtower update run.
|
Package session tracks container state and outcomes for a single watchtower update run. |
|
sorter
Package sorter topologically orders containers by their declared depends-on and links graph so updates happen in a safe order.
|
Package sorter topologically orders containers by their declared depends-on and links graph so updates happen in a safe order. |
|
types
Package types defines the data-transfer and interface types shared across watchtower packages.
|
Package types defines the data-transfer and interface types shared across watchtower packages. |
Click to show internal directories.
Click to hide internal directories.