Update documentation for containerd v2.0 packages
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
This commit is contained in:
@@ -189,7 +189,7 @@ See the header of [`go.mod`](https://github.com/containerd/containerd/blob/main/
|
||||
|
||||
### Connecting to containerd
|
||||
|
||||
We will start a new `main.go` file and import the containerd root package that contains the client.
|
||||
We will start a new `main.go` file and import the containerd client package.
|
||||
|
||||
|
||||
```go
|
||||
@@ -198,7 +198,7 @@ package main
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
containerd "github.com/containerd/containerd/v2/client"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -252,8 +252,8 @@ import (
|
||||
"context"
|
||||
"log"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
"github.com/containerd/containerd/namespaces"
|
||||
containerd "github.com/containerd/containerd/v2/client"
|
||||
"github.com/containerd/containerd/v2/namespaces"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -327,9 +327,9 @@ import (
|
||||
"context"
|
||||
"log"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
"github.com/containerd/containerd/oci"
|
||||
"github.com/containerd/containerd/namespaces"
|
||||
containerd "github.com/containerd/containerd/v2/client"
|
||||
"github.com/containerd/containerd/v2/namespaces"
|
||||
"github.com/containerd/containerd/v2/oci"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -474,10 +474,10 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
"github.com/containerd/containerd/cio"
|
||||
"github.com/containerd/containerd/oci"
|
||||
"github.com/containerd/containerd/namespaces"
|
||||
"github.com/containerd/containerd/v2/cio"
|
||||
containerd "github.com/containerd/containerd/v2/client"
|
||||
"github.com/containerd/containerd/v2/oci"
|
||||
"github.com/containerd/containerd/v2/namespaces"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -526,7 +526,7 @@ func redisExample() error {
|
||||
// make sure we wait before calling start
|
||||
exitStatusC, err := task.Wait(ctx)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return err
|
||||
}
|
||||
|
||||
// call start on the task to execute the redis server
|
||||
|
||||
Reference in New Issue
Block a user