Documentation ¶
Index ¶
- Constants
- Variables
- type ContainerServer
- func (c *ContainerServer) AddContainer(ctr *oci.Container)
- func (c *ContainerServer) AddInfraContainer(ctr *oci.Container)
- func (c *ContainerServer) AddSandbox(sb *sandbox.Sandbox) error
- func (c *ContainerServer) Config() *libconfig.Config
- func (c *ContainerServer) ContainerKill(container string, killSignal syscall.Signal) (string, error)
- func (c *ContainerServer) ContainerPause(container string) (string, error)
- func (c *ContainerServer) ContainerRename(container, name string) (retErr error)
- func (c *ContainerServer) ContainerStateFromDisk(ctr *oci.Container) error
- func (c *ContainerServer) ContainerStateToDisk(ctr *oci.Container) error
- func (c *ContainerServer) ContainerStop(ctx context.Context, container string, timeout int64) (string, error)
- func (c *ContainerServer) ContainerUnpause(container string) (string, error)
- func (c *ContainerServer) ContainerWait(container string) (int32, error)
- func (c *ContainerServer) CtrIDIndex() *truncindex.TruncIndex
- func (c *ContainerServer) CtrNameIndex() *registrar.Registrar
- func (c *ContainerServer) GetContainer(id string) *oci.Container
- func (c *ContainerServer) GetContainerFromShortID(cid string) (*oci.Container, error)
- func (c *ContainerServer) GetContainerRootFsSize(containerID string) (int64, error)
- func (c *ContainerServer) GetContainerRwSize(containerID string) (int64, error)
- func (c *ContainerServer) GetContainerTopLayerID(containerID string) (string, error)
- func (c *ContainerServer) GetInfraContainer(id string) *oci.Container
- func (c *ContainerServer) GetLogs(container string, logChan chan string, opts LogOptions) error
- func (c *ContainerServer) GetSandbox(id string) *sandbox.Sandbox
- func (c *ContainerServer) GetSandboxContainer(id string) *oci.Container
- func (c *ContainerServer) GetStorageContainer(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(id string) (retErr error)
- func (c *ContainerServer) LoadSandbox(id string) (retErr error)
- func (c *ContainerServer) LookupContainer(idOrName string) (*oci.Container, error)
- func (c *ContainerServer) LookupSandbox(idOrName string) (*sandbox.Sandbox, error)
- func (c *ContainerServer) PodIDIndex() *truncindex.TruncIndex
- func (c *ContainerServer) PodNameIndex() *registrar.Registrar
- func (c *ContainerServer) ReleaseContainerName(name string)
- func (c *ContainerServer) ReleasePodName(name string)
- func (c *ContainerServer) Remove(ctx context.Context, container string, force bool) (string, error)
- func (c *ContainerServer) RemoveContainer(ctr *oci.Container)
- func (c *ContainerServer) RemoveInfraContainer(ctr *oci.Container)
- func (c *ContainerServer) RemoveSandbox(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) StopContainerAndWait(ctx context.Context, ctr *oci.Container, timeout int64) error
- func (c *ContainerServer) StorageImageServer() storage.ImageServer
- func (c *ContainerServer) StorageRuntimeServer() storage.RuntimeServer
- func (c *ContainerServer) Store() cstorage.Store
- type LogOptions
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 ¶
This section is empty.
Types ¶
type ContainerServer ¶
ContainerServer implements the ImageServer
func (*ContainerServer) AddContainer ¶
func (c *ContainerServer) AddContainer(ctr *oci.Container)
AddContainer adds a container to the container state store
func (*ContainerServer) AddInfraContainer ¶
func (c *ContainerServer) AddInfraContainer(ctr *oci.Container)
AddInfraContainer adds a container to the container state store
func (*ContainerServer) AddSandbox ¶
func (c *ContainerServer) AddSandbox(sb *sandbox.Sandbox) error
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) ContainerKill ¶
func (c *ContainerServer) ContainerKill(container string, killSignal syscall.Signal) (string, error)
ContainerKill sends the user provided signal to the containers primary process.
func (*ContainerServer) ContainerPause ¶
func (c *ContainerServer) ContainerPause(container string) (string, error)
ContainerPause pauses a running container.
func (*ContainerServer) ContainerRename ¶
func (c *ContainerServer) ContainerRename(container, name string) (retErr error)
ContainerRename renames the given container
func (*ContainerServer) ContainerStateFromDisk ¶
func (c *ContainerServer) ContainerStateFromDisk(ctr *oci.Container) error
ContainerStateFromDisk retrieves information on the state of a running container from the disk
func (*ContainerServer) ContainerStateToDisk ¶
func (c *ContainerServer) ContainerStateToDisk(ctr *oci.Container) error
ContainerStateToDisk writes the container's state information to a JSON file on disk
func (*ContainerServer) ContainerStop ¶
func (c *ContainerServer) ContainerStop(ctx context.Context, container string, timeout int64) (string, error)
ContainerStop stops a running container with a grace period (i.e., timeout).
func (*ContainerServer) ContainerUnpause ¶
func (c *ContainerServer) ContainerUnpause(container string) (string, error)
ContainerUnpause unpauses a running container with a grace period (i.e., timeout).
func (*ContainerServer) ContainerWait ¶
func (c *ContainerServer) ContainerWait(container string) (int32, error)
ContainerWait stops a running container with a grace period (i.e., timeout).
func (*ContainerServer) CtrIDIndex ¶
func (c *ContainerServer) CtrIDIndex() *truncindex.TruncIndex
CtrIDIndex returns the TruncIndex for the ContainerServer
func (*ContainerServer) CtrNameIndex ¶
func (c *ContainerServer) CtrNameIndex() *registrar.Registrar
CtrNameIndex returns the Registrar for the ContainerServer
func (*ContainerServer) GetContainer ¶
func (c *ContainerServer) GetContainer(id string) *oci.Container
GetContainer returns a container by its ID
func (*ContainerServer) GetContainerFromShortID ¶
func (c *ContainerServer) GetContainerFromShortID(cid string) (*oci.Container, error)
GetContainerFromShortID gets an oci container matching the specified full or partial id
func (*ContainerServer) GetContainerRootFsSize ¶
func (c *ContainerServer) GetContainerRootFsSize(containerID string) (int64, error)
GetContainerRootFsSize gets the size of the container's root filesystem A container FS is split into two parts. The first is the top layer, a mutable layer, and the rest is the RootFS: the set of immutable layers that make up the image on which the container is based
func (*ContainerServer) GetContainerRwSize ¶
func (c *ContainerServer) GetContainerRwSize(containerID string) (int64, error)
GetContainerRwSize Gets the size of the mutable top layer of the container
func (*ContainerServer) GetContainerTopLayerID ¶
func (c *ContainerServer) GetContainerTopLayerID(containerID string) (string, error)
GetContainerTopLayerID gets the ID of the top layer of the given container
func (*ContainerServer) GetInfraContainer ¶
func (c *ContainerServer) GetInfraContainer(id string) *oci.Container
GetInfraContainer returns a container by its ID
func (*ContainerServer) GetLogs ¶
func (c *ContainerServer) GetLogs(container string, logChan chan string, opts LogOptions) error
GetLogs gets each line of a log file and, if it matches the criteria in logOptions, sends it down logChan
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(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(id string) (retErr error)
LoadContainer loads a container from the disk into the container store
func (*ContainerServer) LoadSandbox ¶
func (c *ContainerServer) LoadSandbox(id string) (retErr error)
LoadSandbox loads a sandbox from the disk into the sandbox store
func (*ContainerServer) LookupContainer ¶
func (c *ContainerServer) LookupContainer(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) PodIDIndex ¶
func (c *ContainerServer) PodIDIndex() *truncindex.TruncIndex
PodIDIndex returns the index of pod IDs
func (*ContainerServer) PodNameIndex ¶
func (c *ContainerServer) PodNameIndex() *registrar.Registrar
PodNameIndex returns the index of pod names
func (*ContainerServer) ReleaseContainerName ¶
func (c *ContainerServer) ReleaseContainerName(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(ctr *oci.Container)
RemoveContainer removes a container from the container state store
func (*ContainerServer) RemoveInfraContainer ¶
func (c *ContainerServer) RemoveInfraContainer(ctr *oci.Container)
RemoveInfraContainer removes a container from the container state store
func (*ContainerServer) RemoveSandbox ¶
func (c *ContainerServer) RemoveSandbox(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) StopContainerAndWait ¶ added in v1.18.0
func (c *ContainerServer) StopContainerAndWait(ctx context.Context, ctr *oci.Container, timeout int64) error
StopContainerAndWait is a wrapping function that stops a container and waits for the container state to be stopped
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