doc: fix package import path in sample code
fix package import path that was changed as part of v2 in sample code snippets. Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
This commit is contained in:
parent
7516bb915c
commit
b608c6f73d
@ -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"
|
||||
)
|
||||
|
||||
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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() {
|
||||
|
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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() {
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user