Skip to content

Commit

Permalink
Merge pull request #4731 from thaJeztah/stats_godoc
Browse files Browse the repository at this point in the history
cli/command/container: statsOptions: add GoDoc
  • Loading branch information
thaJeztah authored Dec 20, 2023
2 parents 05a2dc4 + e9a5590 commit 8b53402
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions cli/command/container/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,26 @@ import (
"github.com/spf13/cobra"
)

// statsOptions defines options for runStats.
type statsOptions struct {
all bool
noStream bool
noTrunc bool
format string
// all allows including both running and stopped containers. The default
// is to only include running containers.
all bool

// noStream disables streaming stats. If enabled, stats are collected once,
// and the result is printed.
noStream bool

// noTrunc disables truncating the output. The default is to truncate
// output such as container-IDs.
noTrunc bool

// format is a custom template to use for presenting the stats.
// Refer to [flagsHelper.FormatHelp] for accepted formats.
format string

// containers is the list of container names or IDs to include in the stats.
// If empty, all containers are included.
containers []string
}

Expand Down

0 comments on commit 8b53402

Please sign in to comment.