nri – github.com/containerd/nri Index | Files | Directories

package nri

import "github.com/containerd/nri"

Index

Constants

const (
	// DefaultBinaryPath for nri plugins
	DefaultBinaryPath = "/opt/nri/bin"
	// DefaultConfPath for the global nri configuration
	DefaultConfPath = "/etc/nri/conf.json"
	// Version of NRI
	Version = "0.1"
)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for calling nri plugins

func New

func New() (*Client, error)

New nri client

func (*Client) Invoke

func (c *Client) Invoke(ctx context.Context, task Task, state types.State) ([]*types.Result, error)

Invoke the ConfList of nri plugins

func (*Client) InvokeWithSandbox

func (c *Client) InvokeWithSandbox(ctx context.Context, task Task, state types.State, sandbox *Sandbox) ([]*types.Result, error)

InvokeWithSandbox invokes the ConfList of nri plugins

type Sandbox

type Sandbox struct {
	// ID of the sandbox
	ID string
	// Labels of the sandbox
	Labels map[string]string
}

Sandbox information

type Task

type Task interface {

	// Spec returns the current OCI specification for the task
	Spec(context.Context) (*oci.Spec, error)
	// contains filtered or unexported methods
}

Task is a subset of containerd's Task interface.

Source Files

client.go

Directories

PathSynopsis
pkg
pkg/adaptation
pkg/apiCode generated by protoc-gen-go-ttrpc.
pkg/log
pkg/net
pkg/net/multiplex
pkg/runtime-tools
pkg/runtime-tools/generate
pkg/stub
skel
types
types/v1
Version
v0.9.0 (latest)
Published
Dec 12, 2024
Platform
linux/amd64
Imports
9 packages
Last checked
2 months ago

Tools for package owners.