Movatterモバイル変換


[0]ホーム

URL:


types

package
v28.5.2+incompatibleLatest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License:Apache-2.0Imports:6Imported by:616

Details

Repository

github.com/docker/docker

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeBackend

type Backend interface {ProcessEvent(containerIDstring, eventEventType, eiEventInfo)error}

Backend defines callbacks that the client of the library needs to implement.

typeCheckpoints

type Checkpoints struct{}

Checkpoints contains the details of a checkpoint

typeClient

type Client interface {Version(ctxcontext.Context) (containerd.Version,error)// LoadContainer loads the metadata for a container from containerd.LoadContainer(ctxcontext.Context, containerIDstring) (Container,error)// NewContainer creates a new containerd container.NewContainer(ctxcontext.Context, containerIDstring, spec *specs.Spec, shimstring, runtimeOptions interface{}, opts ...containerd.NewContainerOpts) (Container,error)}

Client provides access to containerd features.

typeContainer

type Container interface {NewTask(ctxcontext.Context, checkpointDirstring, withStdinbool, attachStdioStdioCallback) (Task,error)Task(ctxcontext.Context) (Task,error)// AttachTask returns the current task for the container and reattaches// to the IO for the running task. If no task exists for the container// a NotFound error is returned.//// Clients must make sure that only one reader is attached to the task.AttachTask(ctxcontext.Context, attachStdioStdioCallback) (Task,error)// Delete removes the container and associated resourcesDelete(context.Context)error}

Container provides access to a containerd container.

typeEventInfo

type EventInfo struct {ContainerIDstringProcessIDstringPiduint32ExitCodeuint32ExitedAttime.TimeErrorerror}

EventInfo contains the event info

typeEventType

type EventTypestring

EventType represents a possible event from libcontainerd

const (EventUnknownEventType = "unknown"EventExitEventType = "exit"EventOOMEventType = "oom"EventCreateEventType = "create"EventStartEventType = "start"EventExecAddedEventType = "exec-added"EventExecStartedEventType = "exec-started"EventPausedEventType = "paused"EventResumedEventType = "resumed")

Event constants used when reporting events

typeProcess

type Process interface {// Pid is the system specific process idPid()uint32// Kill sends the provided signal to the processKill(ctxcontext.Context, signalsyscall.Signal)error// Resize changes the width and height of the process's terminalResize(ctxcontext.Context, width, heightuint32)error// Delete removes the process and any resources allocated returning the exit statusDelete(context.Context) (*containerd.ExitStatus,error)}

Process of a container

typeResources

type Resources = specs.LinuxResources

Resources defines updatable container resource values. TODO: it must match containerd upcoming API

typeStats

type Stats struct {Readtime.Time// Metrics is expected to be either one of:// * github.com/containerd/cgroups/v3/cgroup1/stats.Metrics// * github.com/containerd/cgroups/v3/cgroup2/stats.MetricsMetrics interface{}}

Stats holds metrics properties as returned by containerd

funcInterfaceToStats

func InterfaceToStats(readtime.Time, v interface{}) *Stats

InterfaceToStats returns a stats object from the platform-specific interface.

typeStdioCallback

type StdioCallback func(io *cio.DirectIO) (cio.IO,error)

StdioCallback is called to connect a container or process stdio.

typeSummary

type Summary struct{}

Summary is not used on linux

typeTask

type Task interface {Process// Start begins execution of the taskStart(context.Context)error// Pause suspends the execution of the taskPause(context.Context)error// Resume the execution of the taskResume(context.Context)errorStats(ctxcontext.Context) (*Stats,error)// Pids returns a list of system specific process ids inside the taskPids(context.Context) ([]containerd.ProcessInfo,error)Summary(ctxcontext.Context) ([]Summary,error)// ForceDelete forcefully kills the task's processes and deletes the taskForceDelete(context.Context)error// Status returns the executing status of the taskStatus(ctxcontext.Context) (containerd.Status,error)// Exec creates and starts a new process inside the taskExec(ctxcontext.Context, processIDstring, spec *specs.Process, withStdinbool, attachStdioStdioCallback) (Process,error)UpdateResources(ctxcontext.Context, resources *Resources)errorCreateCheckpoint(ctxcontext.Context, checkpointDirstring, exitbool)error}

Task provides access to a running containerd container.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp