Merge pull request #9692 from akhilerm/fix-sample-code

doc: fix package import in sample code
This commit is contained in:
Phil Estes 2024-01-26 19:13:52 +00:00 committed by GitHub
commit 95d24b6403
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 15 additions and 15 deletions

View File

@ -109,8 +109,8 @@ import (
"context"
containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/containerd/v2/cio"
"github.com/containerd/containerd/v2/namespaces"
"github.com/containerd/containerd/v2/pkg/cio"
"github.com/containerd/containerd/v2/pkg/namespaces"
)

View File

@ -67,7 +67,7 @@ the runtime engine, via `fork`/`exec` to run the container. For example, the `io
an OCI compliant runtime engine such as `runc`.
containerd passes options to the shim over the ttRPC connection, which may include the runtime engine binary
to invoke. These are the `options` for the [`CreateTaskRequest`](https://github.com/containerd/containerd/blob/main/runtime/v2/README.md#container-level-shim-configuration).
to invoke. These are the `options` for the [`CreateTaskRequest`](#container-level-shim-configuration).
For example, the `io.containerd.runc.v2` shim supports including the path to the runtime engine binary.
@ -173,7 +173,7 @@ section:
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes]
```
See [config.toml man page](../../docs/man/containerd-config.toml.5.md) for more details and an example.
See [config.toml man page](../../../docs/man/containerd-config.toml.5.md) for more details and an example.
These "named runtimes" in the configuration file are used solely when invoked via CRI, which has a
[`runtime_handler` field](https://github.com/kubernetes/cri-api/blob/de5f1318aede866435308f39cb432618a15f104e/pkg/apis/runtime/v1/api.proto#L476).
@ -481,7 +481,7 @@ import (
"io"
"sync"
"github.com/containerd/containerd/runtime/v2/logging"
"github.com/containerd/containerd/v2/core/runtime/v2/logging"
"github.com/coreos/go-systemd/journal"
)

View File

@ -44,7 +44,7 @@ containerd to start and manage those containers using the runtime shim api retur
the binary.
For more details on runtimes and shims, including how to invoke and configure them,
see the [runtime v2 documentation](../runtime/v2/README.md)
see the [runtime v2 documentation](../core/runtime/v2/README.md)
### Proxy Plugins
@ -92,7 +92,7 @@ import (
snapshotsapi "github.com/containerd/containerd/v2/api/services/snapshots/v1"
"github.com/containerd/containerd/v2/contrib/snapshotservice"
"github.com/containerd/containerd/v2/snapshots/native"
"github.com/containerd/containerd/v2/plugins/snapshots/native"
)
func main() {

View File

@ -65,7 +65,7 @@ If we want to make a `SpecOpt` to setup a container to monitor the host system w
package monitor
import (
"github.com/containerd/containerd/v2/oci"
"github.com/containerd/containerd/v2/pkg/oci"
specs "github.com/opencontainers/runtime-spec/specs-go"
)

View File

@ -253,7 +253,7 @@ import (
"log"
containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/containerd/v2/namespaces"
"github.com/containerd/containerd/v2/pkg/namespaces"
)
func main() {
@ -328,8 +328,8 @@ import (
"log"
containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/containerd/v2/namespaces"
"github.com/containerd/containerd/v2/oci"
"github.com/containerd/containerd/v2/pkg/namespaces"
"github.com/containerd/containerd/v2/pkg/oci"
)
func main() {
@ -474,10 +474,10 @@ import (
"syscall"
"time"
"github.com/containerd/containerd/v2/cio"
"github.com/containerd/containerd/v2/pkg/cio"
containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/containerd/v2/oci"
"github.com/containerd/containerd/v2/namespaces"
"github.com/containerd/containerd/v2/pkg/oci"
"github.com/containerd/containerd/v2/pkg/namespaces"
)
func main() {

View File

@ -45,7 +45,7 @@ These user-defined labels must be prefixed by `containerd.io/snapshot/`.
```go
import (
containerd "github.com/containerd/containerd/v2/client"
"github.com/containerd/containerd/v2/snapshots"
"github.com/containerd/containerd/v2/core/snapshots"
)
image, err := client.Pull(ctx, ref,