Documentation
¶
Overview ¶
Package cri provides the Kubernetes Container Runtime Interface.
Index ¶
- type CRIPlugin
- func (c *CRIPlugin) CreateContainer(podID, containerID string, imageName string, args, env []string) error
- func (c *CRIPlugin) ImageStatus(imageName string) (*common.ImageInfo, error)
- func (c *CRIPlugin) IsCRIReady() bool
- func (c *CRIPlugin) ListImages() ([]common.ImageInfo, error)
- func (c *CRIPlugin) ListPodSandbox() []*PodSandbox
- func (c *CRIPlugin) PodSandboxStatus(id string) (*PodSandbox, error)
- func (c *CRIPlugin) PullImage(imageName string) error
- func (c *CRIPlugin) RemoveImage(imageName string) error
- func (c *CRIPlugin) RemovePodSandbox(id string) error
- func (c *CRIPlugin) RunPodSandbox(id, name, namespace string, labels, annotations map[string]string) (*PodSandbox, error)
- func (c *CRIPlugin) StopPodSandbox(id string) error
- func (c *CRIPlugin) Version() map[string]string
- type PodSandbox
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CRIPlugin ¶
type CRIPlugin struct {
// contains filtered or unexported fields
}
CRIPlugin implements the Kubernetes Container Runtime Interface. This provides a K8s-compatible container runtime via the CRI gRPC protocol.
func NewCRIPlugin ¶
NewCRIPlugin creates a new CRI plugin.
func (*CRIPlugin) CreateContainer ¶
func (c *CRIPlugin) CreateContainer(podID, containerID string, imageName string, args, env []string) error
CreateContainer creates a container within a pod sandbox.
func (*CRIPlugin) ImageStatus ¶
ImageStatus returns the status of an image.
func (*CRIPlugin) IsCRIReady ¶
IsCRIReady checks if CRI plugin is ready.
func (*CRIPlugin) ListImages ¶
ListImages lists all available images.
func (*CRIPlugin) ListPodSandbox ¶
func (c *CRIPlugin) ListPodSandbox() []*PodSandbox
ListPodSandbox lists all pod sandboxes.
func (*CRIPlugin) PodSandboxStatus ¶
func (c *CRIPlugin) PodSandboxStatus(id string) (*PodSandbox, error)
PodSandboxStatus returns the status of a pod sandbox.
func (*CRIPlugin) RemoveImage ¶
RemoveImage removes an image.
func (*CRIPlugin) RemovePodSandbox ¶
RemovePodSandbox removes a pod sandbox.
func (*CRIPlugin) RunPodSandbox ¶
func (c *CRIPlugin) RunPodSandbox(id, name, namespace string, labels, annotations map[string]string) (*PodSandbox, error)
RunPodSandbox creates and starts a pod sandbox.
func (*CRIPlugin) StopPodSandbox ¶
StopPodSandbox stops a pod sandbox.
type PodSandbox ¶
type PodSandbox struct {
ID string `json:"id"`
Name string `json:"name"`
Namespace string `json:"namespace"`
UID string `json:"uid"`
CreatedAt int64 `json:"created_at"`
Labels map[string]string `json:"labels"`
Annotations map[string]string `json:"annotations"`
Containers []string `json:"containers"`
Hostname string `json:"hostname"`
LogDirectory string `json:"log_directory"`
State string `json:"state"`
}
PodSandbox represents a Kubernetes Pod.