mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-21 21:30:48 +02:00
Add godoc comments
This commit is contained in:
parent
058d6e5507
commit
d6321bf8dc
6 changed files with 42 additions and 1 deletions
|
@ -8,6 +8,10 @@ import (
|
|||
|
||||
func watchtowerContainersFilter(c container.Container) bool { return c.IsWatchtower() }
|
||||
|
||||
// CheckPrereqs will ensure that there are not multiple instances of the
|
||||
// watchtower running simultaneously. If multiple watchtower containers are
|
||||
// detected, this function will stop and remove all but the most recently
|
||||
// started container.
|
||||
func CheckPrereqs(client container.Client, cleanup bool) error {
|
||||
containers, err := client.ListContainers(watchtowerContainersFilter)
|
||||
if err != nil {
|
||||
|
|
|
@ -15,6 +15,10 @@ var (
|
|||
|
||||
func allContainersFilter(container.Container) bool { return true }
|
||||
|
||||
// Update looks at the running Docker containers to see if any of the images
|
||||
// used to start those containers have been updated. If a change is detected in
|
||||
// any of the images, the associated containers are stopped and restarted with
|
||||
// the new image.
|
||||
func Update(client container.Client, cleanup bool) error {
|
||||
log.Info("Checking containers for updated images")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue