container

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Package container comprises functions and structures related to container APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NerdctlFiltersFromAPIFilters added in v0.14.0

func NerdctlFiltersFromAPIFilters(query url.Values) ([]string, error)

func RegisterHandlers

func RegisterHandlers(r types.VersionedRouter, service Service, conf *config.Config, logger flog.Logger)

RegisterHandlers register all the supported endpoints related to the container APIs.

Types

type Service

type Service interface {
	GetPathToFilesInContainer(ctx context.Context, cid string, path string) (string, func(), error)
	Remove(ctx context.Context, cid string, force, removeVolumes bool) error
	Wait(ctx context.Context, cid string, options ncTypes.ContainerWaitOptions) error
	Start(ctx context.Context, cid string, options ncTypes.ContainerStartOptions) error
	Stop(ctx context.Context, cid string, option ncTypes.ContainerStopOptions) error
	Restart(ctx context.Context, cid string, options ncTypes.ContainerRestartOptions) error
	Create(ctx context.Context, image string, cmd []string, createOpt ncTypes.ContainerCreateOptions, netOpt ncTypes.NetworkOptions) (string, error)
	Inspect(ctx context.Context, cid string, size bool) (*types.Container, error)
	WriteFilesAsTarArchive(filePath string, writer io.Writer, slashDot bool) error
	Attach(ctx context.Context, cid string, opts *types.AttachOptions) error
	List(ctx context.Context, listOpts ncTypes.ContainerListOptions) ([]types.ContainerListItem, error)
	Rename(ctx context.Context, cid string, newName string, opts ncTypes.ContainerRenameOptions) error
	Logs(ctx context.Context, cid string, opts *types.LogsOptions) error
	ExtractArchiveInContainer(ctx context.Context, putArchiveOpt *types.PutArchiveOptions, body io.ReadCloser) error
	Stats(ctx context.Context, cid string) (<-chan *types.StatsJSON, error)
	ExecCreate(ctx context.Context, cid string, config types.ExecConfig) (string, error)
	Kill(ctx context.Context, cid string, options ncTypes.ContainerKillOptions) error
	Pause(ctx context.Context, cid string, options ncTypes.ContainerPauseOptions) error
	Unpause(ctx context.Context, cid string, options ncTypes.ContainerUnpauseOptions) error
}

Jump to

Keyboard shortcuts

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