Documentation ¶
Index ¶
- Constants
- Variables
- func HandleUncleanShutdown(config *libconfig.Config, store cstorage.Store) error
- func ShutdownWasUnclean(config *libconfig.Config) bool
- type ContainerCheckpointOptions
- type ContainerServer
- func (c *ContainerServer) AddContainer(ctx context.Context, ctr *oci.Container)
- func (c *ContainerServer) AddInfraContainer(ctx context.Context, ctr *oci.Container)
- func (c *ContainerServer) AddSandbox(ctx context.Context, sb *sandbox.Sandbox) error
- func (c *ContainerServer) Config() *libconfig.Config
- func (c *ContainerServer) ContainerCheckpoint(ctx context.Context, config *metadata.ContainerConfig, ...) (string, error)
- func (c *ContainerServer) ContainerIDForName(name string) (string, error)
- func (c *ContainerServer) ContainerRestore(ctx context.Context, config *metadata.ContainerConfig, ...) (string, error)
- func (c *ContainerServer) ContainerStateToDisk(ctx context.Context, ctr *oci.Container) error
- func (c *ContainerServer) CtrIDIndex() *truncindex.TruncIndex
- func (c *ContainerServer) GetContainer(ctx context.Context, id string) *oci.Container
- func (c *ContainerServer) GetContainerFromShortID(ctx context.Context, cid string) (*oci.Container, error)
- func (c *ContainerServer) GetContainerTopLayerID(ctx context.Context, containerID string) (string, error)
- func (c *ContainerServer) GetInfraContainer(ctx context.Context, id string) *oci.Container
- func (c *ContainerServer) GetSandbox(id string) *sandbox.Sandbox
- func (c *ContainerServer) GetSandboxContainer(id string) *oci.Container
- func (c *ContainerServer) GetStorageContainer(ctx context.Context, container string) (*cstorage.Container, error)
- func (c *ContainerServer) HasContainer(id string) bool
- func (c *ContainerServer) HasSandbox(id string) bool
- func (c *ContainerServer) ListContainers(filters ...func(*oci.Container) bool) ([]*oci.Container, error)
- func (c *ContainerServer) ListSandboxes() []*sandbox.Sandbox
- func (c *ContainerServer) LoadContainer(ctx context.Context, id string) (retErr error)
- func (c *ContainerServer) LoadSandbox(ctx context.Context, id string) (sb *sandbox.Sandbox, retErr error)
- func (c *ContainerServer) LookupContainer(ctx context.Context, idOrName string) (*oci.Container, error)
- func (c *ContainerServer) LookupSandbox(idOrName string) (*sandbox.Sandbox, error)
- func (c *ContainerServer) PodIDForName(name string) (string, error)
- func (c *ContainerServer) PodIDIndex() *truncindex.TruncIndex
- func (c *ContainerServer) ReleaseContainerName(ctx context.Context, name string)
- func (c *ContainerServer) ReleasePodName(name string)
- func (c *ContainerServer) RemoveContainer(ctx context.Context, ctr *oci.Container)
- func (c *ContainerServer) RemoveInfraContainer(ctx context.Context, ctr *oci.Container)
- func (c *ContainerServer) RemoveSandbox(ctx context.Context, id string) error
- func (c *ContainerServer) ReserveContainerName(id, name string) (string, error)
- func (c *ContainerServer) ReservePodName(id, name string) (string, error)
- func (c *ContainerServer) Runtime() *oci.Runtime
- func (c *ContainerServer) Shutdown() error
- func (c *ContainerServer) StorageImageServer() storage.ImageServer
- func (c *ContainerServer) StorageRuntimeServer() storage.RuntimeServer
- func (c *ContainerServer) Store() cstorage.Store
- func (c *ContainerServer) UpdateContainerLinuxResources(ctr *oci.Container, resources *rspec.LinuxResources)
- type ExternalBindMount
Constants ¶
const ContainerManagerCRIO = "cri-o"
ContainerManagerCRIO specifies an annotation value which indicates that the container has been created by CRI-O. Usually used together with the key `io.container.manager`.
Variables ¶
var ErrIsNonCrioContainer = errors.New("non CRI-O container")
Functions ¶
func HandleUncleanShutdown ¶ added in v1.28.0
func ShutdownWasUnclean ¶ added in v1.28.0
Types ¶
type ContainerCheckpointOptions ¶ added in v1.29.0
type ContainerCheckpointOptions struct { // Keep tells the API to not delete checkpoint artifacts Keep bool // KeepRunning tells the API to keep the container running // after writing the checkpoint to disk KeepRunning bool // TargetFile tells the API to read (or write) the checkpoint image // from (or to) the filename set in TargetFile TargetFile string }
ContainerCheckpointOptions is the relevant subset of libpod.ContainerCheckpointOptions
type ContainerServer ¶
type ContainerServer struct { Hooks *hooks.Manager *statsserver.StatsServer // contains filtered or unexported fields }
ContainerServer implements the ImageServer
func (*ContainerServer) AddContainer ¶
func (c *ContainerServer) AddContainer(ctx context.Context, ctr *oci.Container)
AddContainer adds a container to the container state store
func (*ContainerServer) AddInfraContainer ¶
func (c *ContainerServer) AddInfraContainer(ctx context.Context, ctr *oci.Container)
AddInfraContainer adds a container to the container state store
func (*ContainerServer) AddSandbox ¶
AddSandbox adds a sandbox to the sandbox state store
func (*ContainerServer) Config ¶
func (c *ContainerServer) Config() *libconfig.Config
Config gets the configuration for the ContainerServer
func (*ContainerServer) ContainerCheckpoint ¶ added in v1.25.0
func (c *ContainerServer) ContainerCheckpoint( ctx context.Context, config *metadata.ContainerConfig, opts *ContainerCheckpointOptions, ) (string, error)
ContainerCheckpoint checkpoints a running container.
func (*ContainerServer) ContainerIDForName ¶ added in v1.22.0
func (c *ContainerServer) ContainerIDForName(name string) (string, error)
ContainerIDForName gets the container ID given the container name from the ID Index
func (*ContainerServer) ContainerRestore ¶ added in v1.25.0
func (c *ContainerServer) ContainerRestore( ctx context.Context, config *metadata.ContainerConfig, opts *ContainerCheckpointOptions, ) (string, error)
ContainerRestore restores a checkpointed container.
func (*ContainerServer) ContainerStateToDisk ¶
ContainerStateToDisk writes the container's state information to a JSON file on disk
func (*ContainerServer) CtrIDIndex ¶
func (c *ContainerServer) CtrIDIndex() *truncindex.TruncIndex
CtrIDIndex returns the TruncIndex for the ContainerServer
func (*ContainerServer) GetContainer ¶
GetContainer returns a container by its ID
func (*ContainerServer) GetContainerFromShortID ¶
func (c *ContainerServer) GetContainerFromShortID(ctx context.Context, cid string) (*oci.Container, error)
GetContainerFromShortID gets an oci container matching the specified full or partial id
func (*ContainerServer) GetContainerTopLayerID ¶
func (c *ContainerServer) GetContainerTopLayerID(ctx context.Context, containerID string) (string, error)
GetContainerTopLayerID gets the ID of the top layer of the given container
func (*ContainerServer) GetInfraContainer ¶
GetInfraContainer returns a container by its ID
func (*ContainerServer) GetSandbox ¶
func (c *ContainerServer) GetSandbox(id string) *sandbox.Sandbox
GetSandbox returns a sandbox by its ID
func (*ContainerServer) GetSandboxContainer ¶
func (c *ContainerServer) GetSandboxContainer(id string) *oci.Container
GetSandboxContainer returns a sandbox's infra container
func (*ContainerServer) GetStorageContainer ¶
func (c *ContainerServer) GetStorageContainer(ctx context.Context, container string) (*cstorage.Container, error)
GetStorageContainer searches for a container with the given name or ID in the given store
func (*ContainerServer) HasContainer ¶
func (c *ContainerServer) HasContainer(id string) bool
HasContainer checks if a container exists in the state
func (*ContainerServer) HasSandbox ¶
func (c *ContainerServer) HasSandbox(id string) bool
HasSandbox checks if a sandbox exists in the state
func (*ContainerServer) ListContainers ¶
func (c *ContainerServer) ListContainers(filters ...func(*oci.Container) bool) ([]*oci.Container, error)
ListContainers returns a list of all containers stored by the server state that match the given filter function
func (*ContainerServer) ListSandboxes ¶
func (c *ContainerServer) ListSandboxes() []*sandbox.Sandbox
ListSandboxes lists all sandboxes in the state store
func (*ContainerServer) LoadContainer ¶
func (c *ContainerServer) LoadContainer(ctx context.Context, id string) (retErr error)
LoadContainer loads a container from the disk into the container store
func (*ContainerServer) LoadSandbox ¶
func (c *ContainerServer) LoadSandbox(ctx context.Context, id string) (sb *sandbox.Sandbox, retErr error)
LoadSandbox loads a sandbox from the disk into the sandbox store
func (*ContainerServer) LookupContainer ¶
func (c *ContainerServer) LookupContainer(ctx context.Context, idOrName string) (*oci.Container, error)
LookupContainer returns the container with the given name or full or partial id
func (*ContainerServer) LookupSandbox ¶
func (c *ContainerServer) LookupSandbox(idOrName string) (*sandbox.Sandbox, error)
LookupSandbox returns the pod sandbox with the given name or full or partial id
func (*ContainerServer) PodIDForName ¶ added in v1.22.0
func (c *ContainerServer) PodIDForName(name string) (string, error)
PodIDForName gets the pod ID given the pod name from the ID Index
func (*ContainerServer) PodIDIndex ¶
func (c *ContainerServer) PodIDIndex() *truncindex.TruncIndex
PodIDIndex returns the index of pod IDs
func (*ContainerServer) ReleaseContainerName ¶
func (c *ContainerServer) ReleaseContainerName(ctx context.Context, name string)
ReleaseContainerName releases a container name from the index so that it can be used by other containers
func (*ContainerServer) ReleasePodName ¶
func (c *ContainerServer) ReleasePodName(name string)
ReleasePodName releases a pod name from the index so it can be used by other pods
func (*ContainerServer) RemoveContainer ¶
func (c *ContainerServer) RemoveContainer(ctx context.Context, ctr *oci.Container)
RemoveContainer removes a container from the container state store
func (*ContainerServer) RemoveInfraContainer ¶
func (c *ContainerServer) RemoveInfraContainer(ctx context.Context, ctr *oci.Container)
RemoveInfraContainer removes a container from the container state store
func (*ContainerServer) RemoveSandbox ¶
func (c *ContainerServer) RemoveSandbox(ctx context.Context, id string) error
RemoveSandbox removes a sandbox from the state store
func (*ContainerServer) ReserveContainerName ¶
func (c *ContainerServer) ReserveContainerName(id, name string) (string, error)
ReserveContainerName holds a name for a container that is being created
func (*ContainerServer) ReservePodName ¶
func (c *ContainerServer) ReservePodName(id, name string) (string, error)
ReservePodName holds a name for a pod that is being created
func (*ContainerServer) Runtime ¶
func (c *ContainerServer) Runtime() *oci.Runtime
Runtime returns the oci runtime for the ContainerServer
func (*ContainerServer) Shutdown ¶
func (c *ContainerServer) Shutdown() error
Shutdown attempts to shut down the server's storage cleanly
func (*ContainerServer) StorageImageServer ¶
func (c *ContainerServer) StorageImageServer() storage.ImageServer
StorageImageServer returns the ImageServer for the ContainerServer
func (*ContainerServer) StorageRuntimeServer ¶
func (c *ContainerServer) StorageRuntimeServer() storage.RuntimeServer
StorageRuntimeServer gets the runtime server for the ContainerServer
func (*ContainerServer) Store ¶
func (c *ContainerServer) Store() cstorage.Store
Store returns the Store for the ContainerServer
func (*ContainerServer) UpdateContainerLinuxResources ¶ added in v1.19.0
func (c *ContainerServer) UpdateContainerLinuxResources(ctr *oci.Container, resources *rspec.LinuxResources)