docs: add cio import
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
This commit is contained in:
parent
617c63de06
commit
350e8156bf
@ -45,7 +45,11 @@ containerd offers a full client package to help you integrate containerd into yo
|
|||||||
|
|
||||||
```go
|
```go
|
||||||
|
|
||||||
import "github.com/containerd/containerd"
|
import (
|
||||||
|
"github.com/containerd/containerd"
|
||||||
|
"github.com/containerd/containerd/cio"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
client, err := containerd.New("/run/containerd/containerd.sock")
|
client, err := containerd.New("/run/containerd/containerd.sock")
|
||||||
@ -61,7 +65,7 @@ Namespaces allow multiple consumers to use the same containerd without conflicti
|
|||||||
To set a namespace for requests to the API:
|
To set a namespace for requests to the API:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
context = context.Background()
|
context = context.Background()
|
||||||
// create a context for docker
|
// create a context for docker
|
||||||
docker = namespaces.WithNamespace(context, "docker")
|
docker = namespaces.WithNamespace(context, "docker")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user