Merge pull request #4731 from thaJeztah/stats_godoc

cli/command/container: statsOptions: add GoDoc
This commit is contained in:
Sebastiaan van Stijn 2023-12-20 17:42:19 +01:00 committed by GitHub
commit 8b53402125
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 4 deletions

View File

@ -21,11 +21,26 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )
// statsOptions defines options for runStats.
type statsOptions struct { type statsOptions struct {
// all allows including both running and stopped containers. The default
// is to only include running containers.
all bool all bool
// noStream disables streaming stats. If enabled, stats are collected once,
// and the result is printed.
noStream bool noStream bool
// noTrunc disables truncating the output. The default is to truncate
// output such as container-IDs.
noTrunc bool noTrunc bool
// format is a custom template to use for presenting the stats.
// Refer to [flagsHelper.FormatHelp] for accepted formats.
format string format string
// containers is the list of container names or IDs to include in the stats.
// If empty, all containers are included.
containers []string containers []string
} }