containerd

package
v0.0.0-...-430dc37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContainerdClient

func NewContainerdClient(opts Options) (_type.ContainerClient, error)

NewContainerdClient establishes a connection to containerd. The error is returned to the caller rather than panicking.

func Push

func Push(ctx context.Context, client *containerd.Client, rawRef, username, password string, options types.ImagePushOptions) error

Push uploads `rawRef` to its remote registry. It mirrors nerdctl's push implementation but is parameterised by the credentials supplied via gRPC.

Types

type Client

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

Client wraps a containerd.Client and remembers which namespace to use.

func (*Client) CommitImageFromSelf

func (c *Client) CommitImageFromSelf(ctx context.Context, containerID, image string) error

CommitImageFromSelf snapshots the named container.

func (*Client) PushImageFromSelf

func (c *Client) PushImageFromSelf(ctx context.Context, rawRef, username, password string) error

PushImageFromSelf pushes via nerdctl's push helper, with insecure-fallback driven by the registry's response.

type Options

type Options struct {
	// Address is the path to the containerd UDS. Empty = default.
	Address string
	// Namespace is the containerd namespace, e.g. "k8s.io".
	Namespace string
}

Options configures the containerd client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL