Documentation
¶
Overview ¶
* This file is part of the KubeVirt project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Copyright 2021 Red Hat, Inc. *
Index ¶
- type FileSystems
- type FindmntInfo
- type MockVolumeMounter
- func (_m *MockVolumeMounter) EXPECT() *_MockVolumeMounterRecorder
- func (_m *MockVolumeMounter) IsMounted(vmi *v1.VirtualMachineInstance, volume string, sourceUID types.UID) (bool, error)
- func (_m *MockVolumeMounter) Mount(vmi *v1.VirtualMachineInstance) error
- func (_m *MockVolumeMounter) MountFromPod(vmi *v1.VirtualMachineInstance, sourceUID types.UID) error
- func (_m *MockVolumeMounter) Unmount(vmi *v1.VirtualMachineInstance) error
- func (_m *MockVolumeMounter) UnmountAll(vmi *v1.VirtualMachineInstance) error
- type VolumeMounter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileSystems ¶ added in v0.43.0
type FileSystems struct {
Filesystems []FindmntInfo `json:"filesystems"`
}
type FindmntInfo ¶ added in v0.43.0
type FindmntInfo struct { Target string `json:"target"` Source string `json:"source"` Fstype string `json:"fstype"` Options string `json:"options"` }
func LookupFindmntInfoByDevice ¶ added in v0.43.0
func LookupFindmntInfoByDevice(deviceName string) ([]FindmntInfo, error)
func LookupFindmntInfoByVolume ¶ added in v0.43.0
func LookupFindmntInfoByVolume(volumeName string, pid int) ([]FindmntInfo, error)
func (*FindmntInfo) GetOptions ¶ added in v0.43.0
func (f *FindmntInfo) GetOptions() []string
func (*FindmntInfo) GetSource ¶ added in v0.43.0
func (f *FindmntInfo) GetSource() string
type MockVolumeMounter ¶
type MockVolumeMounter struct {
// contains filtered or unexported fields
}
Mock of VolumeMounter interface
func NewMockVolumeMounter ¶
func NewMockVolumeMounter(ctrl *gomock.Controller) *MockVolumeMounter
func (*MockVolumeMounter) EXPECT ¶
func (_m *MockVolumeMounter) EXPECT() *_MockVolumeMounterRecorder
func (*MockVolumeMounter) IsMounted ¶
func (_m *MockVolumeMounter) IsMounted(vmi *v1.VirtualMachineInstance, volume string, sourceUID types.UID) (bool, error)
func (*MockVolumeMounter) Mount ¶
func (_m *MockVolumeMounter) Mount(vmi *v1.VirtualMachineInstance) error
func (*MockVolumeMounter) MountFromPod ¶ added in v0.44.1
func (_m *MockVolumeMounter) MountFromPod(vmi *v1.VirtualMachineInstance, sourceUID types.UID) error
func (*MockVolumeMounter) Unmount ¶
func (_m *MockVolumeMounter) Unmount(vmi *v1.VirtualMachineInstance) error
func (*MockVolumeMounter) UnmountAll ¶
func (_m *MockVolumeMounter) UnmountAll(vmi *v1.VirtualMachineInstance) error
type VolumeMounter ¶
type VolumeMounter interface { // Mount any new volumes defined in the VMI Mount(vmi *v1.VirtualMachineInstance) error MountFromPod(vmi *v1.VirtualMachineInstance, sourceUID types.UID) error // Unmount any volumes no longer defined in the VMI Unmount(vmi *v1.VirtualMachineInstance) error //UnmountAll cleans up all hotplug volumes UnmountAll(vmi *v1.VirtualMachineInstance) error //IsMounted returns if the volume is mounted or not. IsMounted(vmi *v1.VirtualMachineInstance, volume string, sourceUID types.UID) (bool, error) }
VolumeMounter is the interface used to mount and unmount volumes to/from a running virtlauncher pod.
func NewVolumeMounter ¶
func NewVolumeMounter(isoDetector isolation.PodIsolationDetector, mountStateDir string) VolumeMounter
NewVolumeMounter creates a new VolumeMounter