commit
de546a154f
@ -7,7 +7,7 @@ github.com/containerd/console v1.0.1
|
||||
github.com/containerd/continuity efbc4488d8fe1bdc16bde3b2d2990d9b3a899165
|
||||
github.com/containerd/fifo f15a3290365b9d2627d189e619ab4008e0069caf
|
||||
github.com/containerd/go-runc 7016d3ce2328dd2cb1192b2076ebd565c4e8df0c
|
||||
github.com/containerd/nri 0afc7f031eaf9c7d9c1a381b7ab5462e89c998fc
|
||||
github.com/containerd/nri eb1350a75164f76de48e3605389e7a3fbc85d06e
|
||||
github.com/containerd/ttrpc v1.0.2
|
||||
github.com/containerd/typeurl v1.0.1
|
||||
github.com/coreos/go-systemd/v22 v22.1.0
|
||||
|
10
vendor/github.com/containerd/nri/client.go
generated
vendored
10
vendor/github.com/containerd/nri/client.go
generated
vendored
@ -7,6 +7,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"sync"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
"github.com/containerd/containerd/oci"
|
||||
@ -23,15 +24,22 @@ const (
|
||||
Version = "0.1"
|
||||
)
|
||||
|
||||
var appendPathOnce sync.Once
|
||||
|
||||
// New nri client
|
||||
func New() (*Client, error) {
|
||||
conf, err := loadConfig(DefaultConfPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := os.Setenv("PATH", fmt.Sprintf("%s:%s", os.Getenv("PATH"), DefaultBinaryPath)); err != nil {
|
||||
|
||||
appendPathOnce.Do(func() {
|
||||
err = os.Setenv("PATH", fmt.Sprintf("%s:%s", os.Getenv("PATH"), DefaultBinaryPath))
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &Client{
|
||||
conf: conf,
|
||||
}, nil
|
||||
|
8
vendor/github.com/containerd/nri/types/v1/types.go
generated
vendored
8
vendor/github.com/containerd/nri/types/v1/types.go
generated
vendored
@ -81,6 +81,14 @@ type Request struct {
|
||||
Results []*Result `json:"results,omitempty"`
|
||||
}
|
||||
|
||||
// NewPluginError returns a plugin error
|
||||
func NewPluginError(name string, err error) error {
|
||||
return &PluginError{
|
||||
Plugin: name,
|
||||
Message: err.Error(),
|
||||
}
|
||||
}
|
||||
|
||||
// PluginError for specific plugin execution
|
||||
type PluginError struct {
|
||||
// Plugin name
|
||||
|
Loading…
Reference in New Issue
Block a user