File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,7 +64,9 @@ type binary struct {
6464}
6565
6666func (b * binary ) Start (ctx context.Context , opts * types.Any , onClose func ()) (_ * shim , err error ) {
67- cmd , err := client .Command (
67+ // containerd daemon is the intended caller of client.Command; the deprecation
68+ // targets external callers.
69+ cmd , err := client .Command ( //nolint:staticcheck // SA1019
6870 ctx ,
6971 & client.CommandConfig {
7072 ID : b .bundle .ID ,
@@ -165,7 +167,9 @@ func (b *binary) Delete(ctx context.Context) (*runtime.Exit, error) {
165167 bundlePath = b .bundle .Path
166168 }
167169
168- cmd , err := client .Command (ctx ,
170+ // containerd daemon is the intended caller of client.Command; the deprecation
171+ // targets external callers.
172+ cmd , err := client .Command (ctx , //nolint:staticcheck // SA1019
169173 & client.CommandConfig {
170174 ID : b .bundle .ID ,
171175 RuntimePath : b .runtime ,
Original file line number Diff line number Diff line change @@ -57,11 +57,13 @@ type CommandConfig struct {
5757 SocketDir string
5858}
5959
60- // Command returns the shim command with the provided args and configuration
60+ // Command returns the shim command with the provided args and configuration.
6161//
62- // TODO(refactor): move this function to core containerd runtime. This function is only used
63- // by the containerd daemon for the initial shim launches (e.g. shim -start) and makes
64- // no sense for shim implementations.
62+ // Deprecated: this function is internal to the containerd daemon, which uses it to
63+ // invoke the shim binary for "start" and "delete" actions during the shim lifecycle.
64+ // It encodes daemon-specific launch internals — backwards compatibility with older shim
65+ // models and the new Bootstrap protocol used by 2.3+ shims — and is not intended for use
66+ // by external callers. It will be moved into the core containerd runtime package in the future.
6567func Command (ctx context.Context , config * CommandConfig ) (* exec.Cmd , error ) {
6668 ns , err := namespaces .NamespaceRequired (ctx )
6769 if err != nil {
You can’t perform that action at this time.
0 commit comments