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

Function attachAction

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

Source from the content-addressed store, hash-verified

90}
91
92func attachAction(cmd *cobra.Command, args []string) error {
93 options, err := attachOptions(cmd)
94 if err != nil {
95 return err
96 }
97
98 client, ctx, cancel, err := clientutil.NewClient(cmd.Context(), options.GOptions.Namespace, options.GOptions.Address)
99 if err != nil {
100 return err
101 }
102 defer cancel()
103
104 return container.Attach(ctx, client, args[0], options)
105}
106
107func attachShellComplete(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
108 statusFilterFn := func(st containerd.ProcessStatus) bool {

Callers

nothing calls this directly

Calls 3

NewClientFunction · 0.92
AttachFunction · 0.92
attachOptionsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…