MCPcopy Create free account
hub / github.com/containerd/nerdctl / stopAction

Function stopAction

cmd/nerdctl/container/container_stop.go:79–92  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

77}
78
79func stopAction(cmd *cobra.Command, args []string) error {
80 options, err := stopOptions(cmd)
81 if err != nil {
82 return err
83 }
84
85 client, ctx, cancel, err := clientutil.NewClient(cmd.Context(), options.GOptions.Namespace, options.GOptions.Address)
86 if err != nil {
87 return err
88 }
89 defer cancel()
90
91 return container.Stop(ctx, client, args, options)
92}
93
94func stopShellComplete(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
95 // show non-stopped container names

Callers

nothing calls this directly

Calls 3

NewClientFunction · 0.92
StopFunction · 0.92
stopOptionsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…