Plumb contexts through commands
This is to prepare for otel support. Signed-off-by: Brian Goff <cpuguy83@gmail.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
committed by
Sebastiaan van Stijn
parent
9eb632dc7c
commit
5400a48aaf
@ -39,7 +39,7 @@ func newPsCommand(dockerCli command.Cli) *cobra.Command {
|
||||
options.nodeIDs = args
|
||||
}
|
||||
|
||||
return runPs(dockerCli, options)
|
||||
return runPs(cmd.Context(), dockerCli, options)
|
||||
},
|
||||
ValidArgsFunction: completion.NoComplete,
|
||||
}
|
||||
@ -53,9 +53,8 @@ func newPsCommand(dockerCli command.Cli) *cobra.Command {
|
||||
return cmd
|
||||
}
|
||||
|
||||
func runPs(dockerCli command.Cli, options psOptions) error {
|
||||
func runPs(ctx context.Context, dockerCli command.Cli, options psOptions) error {
|
||||
client := dockerCli.Client()
|
||||
ctx := context.Background()
|
||||
|
||||
var (
|
||||
errs []string
|
||||
|
||||
Reference in New Issue
Block a user