mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
bf7fd015f7
This function was removed in the Linux code as part of
f63f73a4a8
, but was not removed in
the Windows code.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
19 lines
710 B
Go
19 lines
710 B
Go
package libcontainerd // import "github.com/docker/docker/libcontainerd"
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/containerd/containerd"
|
|
"github.com/docker/docker/libcontainerd/local"
|
|
"github.com/docker/docker/libcontainerd/remote"
|
|
libcontainerdtypes "github.com/docker/docker/libcontainerd/types"
|
|
"github.com/docker/docker/pkg/system"
|
|
)
|
|
|
|
// NewClient creates a new libcontainerd client from a containerd client
|
|
func NewClient(ctx context.Context, cli *containerd.Client, stateDir, ns string, b libcontainerdtypes.Backend) (libcontainerdtypes.Client, error) {
|
|
if !system.ContainerdRuntimeSupported() {
|
|
return local.NewClient(ctx, cli, stateDir, ns, b)
|
|
}
|
|
return remote.NewClient(ctx, cli, stateDir, ns, b)
|
|
}
|