Documentation ¶
Index ¶
- type VirtletManager
- func (v *VirtletManager) Attach(ctx context.Context, req *kubeapi.AttachRequest) (*kubeapi.AttachResponse, error)
- func (v *VirtletManager) ContainerStats(ctx context.Context, in *kubeapi.ContainerStatsRequest) (*kubeapi.ContainerStatsResponse, error)
- func (v *VirtletManager) ContainerStatus(ctx context.Context, in *kubeapi.ContainerStatusRequest) (*kubeapi.ContainerStatusResponse, error)
- func (v *VirtletManager) CreateContainer(ctx context.Context, in *kubeapi.CreateContainerRequest) (*kubeapi.CreateContainerResponse, error)
- func (v *VirtletManager) Exec(context.Context, *kubeapi.ExecRequest) (*kubeapi.ExecResponse, error)
- func (v *VirtletManager) ExecSync(context.Context, *kubeapi.ExecSyncRequest) (*kubeapi.ExecSyncResponse, error)
- func (v *VirtletManager) ImageFsInfo(ctx context.Context, in *kubeapi.ImageFsInfoRequest) (*kubeapi.ImageFsInfoResponse, error)
- func (v *VirtletManager) ImageStatus(ctx context.Context, in *kubeapi.ImageStatusRequest) (*kubeapi.ImageStatusResponse, error)
- func (v *VirtletManager) ListContainerStats(ctx context.Context, in *kubeapi.ListContainerStatsRequest) (*kubeapi.ListContainerStatsResponse, error)
- func (v *VirtletManager) ListContainers(ctx context.Context, in *kubeapi.ListContainersRequest) (*kubeapi.ListContainersResponse, error)
- func (v *VirtletManager) ListImages(ctx context.Context, in *kubeapi.ListImagesRequest) (*kubeapi.ListImagesResponse, error)
- func (v *VirtletManager) ListPodSandbox(ctx context.Context, in *kubeapi.ListPodSandboxRequest) (*kubeapi.ListPodSandboxResponse, error)
- func (v *VirtletManager) PodSandboxStatus(ctx context.Context, in *kubeapi.PodSandboxStatusRequest) (*kubeapi.PodSandboxStatusResponse, error)
- func (v *VirtletManager) PortForward(ctx context.Context, req *kubeapi.PortForwardRequest) (*kubeapi.PortForwardResponse, error)
- func (v *VirtletManager) PullImage(ctx context.Context, in *kubeapi.PullImageRequest) (*kubeapi.PullImageResponse, error)
- func (v *VirtletManager) RemoveContainer(ctx context.Context, in *kubeapi.RemoveContainerRequest) (*kubeapi.RemoveContainerResponse, error)
- func (v *VirtletManager) RemoveImage(ctx context.Context, in *kubeapi.RemoveImageRequest) (*kubeapi.RemoveImageResponse, error)
- func (v *VirtletManager) RemovePodSandbox(ctx context.Context, in *kubeapi.RemovePodSandboxRequest) (*kubeapi.RemovePodSandboxResponse, error)
- func (v *VirtletManager) RunPodSandbox(ctx context.Context, in *kubeapi.RunPodSandboxRequest) (*kubeapi.RunPodSandboxResponse, error)
- func (v *VirtletManager) Serve(addr string) error
- func (v *VirtletManager) StartContainer(ctx context.Context, in *kubeapi.StartContainerRequest) (*kubeapi.StartContainerResponse, error)
- func (v *VirtletManager) Status(context.Context, *kubeapi.StatusRequest) (*kubeapi.StatusResponse, error)
- func (v *VirtletManager) Stop()
- func (v *VirtletManager) StopContainer(ctx context.Context, in *kubeapi.StopContainerRequest) (*kubeapi.StopContainerResponse, error)
- func (v *VirtletManager) StopPodSandbox(ctx context.Context, in *kubeapi.StopPodSandboxRequest) (*kubeapi.StopPodSandboxResponse, error)
- func (v *VirtletManager) UpdateContainerResources(context.Context, *kubeapi.UpdateContainerResourcesRequest) (*kubeapi.UpdateContainerResourcesResponse, error)
- func (v *VirtletManager) UpdateRuntimeConfig(context.Context, *kubeapi.UpdateRuntimeConfigRequest) (*kubeapi.UpdateRuntimeConfigResponse, error)
- func (v *VirtletManager) Version(ctx context.Context, in *kubeapi.VersionRequest) (*kubeapi.VersionResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VirtletManager ¶
type VirtletManager struct { StreamServer *stream.Server // contains filtered or unexported fields }
VirtletManager serves grpc CRI requests translating them to libvirt calls using additional data stored in metadata store. Network part also uses tapmanager to prepare and cleanup network environment for VM.
func NewVirtletManager ¶
func NewVirtletManager(libvirtURI, rawDevices, imageTranslationConfigsDir string, imageStore image.Store, metadataStore metadata.Store, fdManager tapmanager.FDManager) (*VirtletManager, error)
NewVirtletManager prepares libvirt connection, volumes component, using them to prepare virtualization tool. It calls garbage collection for virtualization tool and image store, then it registers newly prepared VirtletManager instance as runtime and image service through a grpc server.
func (*VirtletManager) Attach ¶
func (v *VirtletManager) Attach(ctx context.Context, req *kubeapi.AttachRequest) (*kubeapi.AttachResponse, error)
Attach calls streamer server to implement Attach functionality from CRI.
func (*VirtletManager) ContainerStats ¶ added in v0.8.0
func (v *VirtletManager) ContainerStats(ctx context.Context, in *kubeapi.ContainerStatsRequest) (*kubeapi.ContainerStatsResponse, error)
ContainerStats is a placeholder for an unimplemented CRI method.
func (*VirtletManager) ContainerStatus ¶
func (v *VirtletManager) ContainerStatus(ctx context.Context, in *kubeapi.ContainerStatusRequest) (*kubeapi.ContainerStatusResponse, error)
ContainerStatus method implements ContainerStatus from CRI.
func (*VirtletManager) CreateContainer ¶
func (v *VirtletManager) CreateContainer(ctx context.Context, in *kubeapi.CreateContainerRequest) (*kubeapi.CreateContainerResponse, error)
CreateContainer method implements CreateContainer from CRI.
func (*VirtletManager) Exec ¶
func (v *VirtletManager) Exec(context.Context, *kubeapi.ExecRequest) (*kubeapi.ExecResponse, error)
Exec is a placeholder for an unimplemented CRI method.
func (*VirtletManager) ExecSync ¶
func (v *VirtletManager) ExecSync(context.Context, *kubeapi.ExecSyncRequest) (*kubeapi.ExecSyncResponse, error)
ExecSync is a placeholder for an unimplemented CRI method.
func (*VirtletManager) ImageFsInfo ¶ added in v0.8.0
func (v *VirtletManager) ImageFsInfo(ctx context.Context, in *kubeapi.ImageFsInfoRequest) (*kubeapi.ImageFsInfoResponse, error)
ImageFsInfo is a placeholder an unimplemented CRI method.
func (*VirtletManager) ImageStatus ¶
func (v *VirtletManager) ImageStatus(ctx context.Context, in *kubeapi.ImageStatusRequest) (*kubeapi.ImageStatusResponse, error)
ImageStatus method implements ImageStatus from CRI.
func (*VirtletManager) ListContainerStats ¶ added in v0.8.0
func (v *VirtletManager) ListContainerStats(ctx context.Context, in *kubeapi.ListContainerStatsRequest) (*kubeapi.ListContainerStatsResponse, error)
ListContainerStats is a placeholder for an unimplemented CRI method.
func (*VirtletManager) ListContainers ¶
func (v *VirtletManager) ListContainers(ctx context.Context, in *kubeapi.ListContainersRequest) (*kubeapi.ListContainersResponse, error)
ListContainers method implements ListContainers from CRI.
func (*VirtletManager) ListImages ¶
func (v *VirtletManager) ListImages(ctx context.Context, in *kubeapi.ListImagesRequest) (*kubeapi.ListImagesResponse, error)
ListImages method implements ListImages from CRI.
func (*VirtletManager) ListPodSandbox ¶
func (v *VirtletManager) ListPodSandbox(ctx context.Context, in *kubeapi.ListPodSandboxRequest) (*kubeapi.ListPodSandboxResponse, error)
ListPodSandbox method implements ListPodSandbox from CRI.
func (*VirtletManager) PodSandboxStatus ¶
func (v *VirtletManager) PodSandboxStatus(ctx context.Context, in *kubeapi.PodSandboxStatusRequest) (*kubeapi.PodSandboxStatusResponse, error)
PodSandboxStatus method implements PodSandboxStatus from CRI.
func (*VirtletManager) PortForward ¶
func (v *VirtletManager) PortForward(ctx context.Context, req *kubeapi.PortForwardRequest) (*kubeapi.PortForwardResponse, error)
PortForward calls streamer server to implement PortForward functionality from CRI.
func (*VirtletManager) PullImage ¶
func (v *VirtletManager) PullImage(ctx context.Context, in *kubeapi.PullImageRequest) (*kubeapi.PullImageResponse, error)
PullImage method implements PullImage from CRI.
func (*VirtletManager) RemoveContainer ¶
func (v *VirtletManager) RemoveContainer(ctx context.Context, in *kubeapi.RemoveContainerRequest) (*kubeapi.RemoveContainerResponse, error)
RemoveContainer method implements RemoveContainer from CRI.
func (*VirtletManager) RemoveImage ¶
func (v *VirtletManager) RemoveImage(ctx context.Context, in *kubeapi.RemoveImageRequest) (*kubeapi.RemoveImageResponse, error)
RemoveImage method implements RemoveImage from CRI.
func (*VirtletManager) RemovePodSandbox ¶
func (v *VirtletManager) RemovePodSandbox(ctx context.Context, in *kubeapi.RemovePodSandboxRequest) (*kubeapi.RemovePodSandboxResponse, error)
RemovePodSandbox method implements RemovePodSandbox from CRI.
func (*VirtletManager) RunPodSandbox ¶
func (v *VirtletManager) RunPodSandbox(ctx context.Context, in *kubeapi.RunPodSandboxRequest) (*kubeapi.RunPodSandboxResponse, error)
RunPodSandbox implements RunPodSandbox method of CRI.
func (*VirtletManager) Serve ¶
func (v *VirtletManager) Serve(addr string) error
Serve prepares a listener on unix socket, than it passes that listener to main loop of grpc server which handles CRI calls.
func (*VirtletManager) StartContainer ¶
func (v *VirtletManager) StartContainer(ctx context.Context, in *kubeapi.StartContainerRequest) (*kubeapi.StartContainerResponse, error)
StartContainer method implements StartContainer from CRI.
func (*VirtletManager) Status ¶
func (v *VirtletManager) Status(context.Context, *kubeapi.StatusRequest) (*kubeapi.StatusResponse, error)
Status method implements Status from CRI for both types of service, Image and Runtime.
func (*VirtletManager) Stop ¶ added in v0.9.0
func (v *VirtletManager) Stop()
Stop halts the manager.
func (*VirtletManager) StopContainer ¶
func (v *VirtletManager) StopContainer(ctx context.Context, in *kubeapi.StopContainerRequest) (*kubeapi.StopContainerResponse, error)
StopContainer method implements StopContainer from CRI.
func (*VirtletManager) StopPodSandbox ¶
func (v *VirtletManager) StopPodSandbox(ctx context.Context, in *kubeapi.StopPodSandboxRequest) (*kubeapi.StopPodSandboxResponse, error)
StopPodSandbox implements StopPodSandbox method of CRI.
func (*VirtletManager) UpdateContainerResources ¶ added in v1.0.0
func (v *VirtletManager) UpdateContainerResources(context.Context, *kubeapi.UpdateContainerResourcesRequest) (*kubeapi.UpdateContainerResourcesResponse, error)
UpdateContainerResources is a placeholder for an unimplemented CRI method.
func (*VirtletManager) UpdateRuntimeConfig ¶
func (v *VirtletManager) UpdateRuntimeConfig(context.Context, *kubeapi.UpdateRuntimeConfigRequest) (*kubeapi.UpdateRuntimeConfigResponse, error)
UpdateRuntimeConfig is a placeholder for an unimplemented CRI method.
func (*VirtletManager) Version ¶
func (v *VirtletManager) Version(ctx context.Context, in *kubeapi.VersionRequest) (*kubeapi.VersionResponse, error)
Version implements Version method of CRI.