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
|
@ -13,8 +13,12 @@ const (
|
|||
defaultStopSignal = "SIGTERM"
|
||||
)
|
||||
|
||||
// A Filter is a prototype for a function that can be used to filter the
|
||||
// results from a call to the ListContainers() method on the Client.
|
||||
type Filter func(Container) bool
|
||||
|
||||
// A Client is the interface through which watchtower interacts with the
|
||||
// Docker API.
|
||||
type Client interface {
|
||||
ListContainers(Filter) ([]Container, error)
|
||||
StopContainer(Container, time.Duration) error
|
||||
|
@ -24,6 +28,8 @@ type Client interface {
|
|||
RemoveImage(Container) error
|
||||
}
|
||||
|
||||
// NewClient returns a new Client instance which can be used to interact with
|
||||
// the Docker API.
|
||||
func NewClient(dockerHost string, tlsConfig *tls.Config, pullImages bool) Client {
|
||||
docker, err := dockerclient.NewDockerClient(dockerHost, tlsConfig)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue