Documentation ¶
Index ¶
- func FindEmptyDirectoryUsageOnTmpfs() (*resource.Quantity, error)
- func NewFakeRecycler(spec *Spec, host VolumeHost, config VolumeConfig) (Recycler, error)
- func NewFakeVolumeHost(rootDir string, kubeClient clientset.Interface, plugins []VolumePlugin) *fakeVolumeHost
- func ProbeVolumePlugins(config VolumeConfig) []VolumePlugin
- type FakeDeleter
- type FakeProvisioner
- type FakeVolume
- func (fv *FakeVolume) Attach() error
- func (fv *FakeVolume) Detach() error
- func (_ *FakeVolume) GetAttributes() Attributes
- func (fv *FakeVolume) GetPath() string
- func (fv *FakeVolume) SetUp(fsGroup *int64) error
- func (fv *FakeVolume) SetUpAt(dir string, fsGroup *int64) error
- func (fv *FakeVolume) TearDown() error
- func (fv *FakeVolume) TearDownAt(dir string) error
- type FakeVolumePlugin
- func (plugin *FakeVolumePlugin) CanSupport(spec *Spec) bool
- func (plugin *FakeVolumePlugin) GetAccessModes() []api.PersistentVolumeAccessMode
- func (plugin *FakeVolumePlugin) Init(host VolumeHost) error
- func (plugin *FakeVolumePlugin) Name() string
- func (plugin *FakeVolumePlugin) NewAttacher(spec *Spec) (Attacher, error)
- func (plugin *FakeVolumePlugin) NewDeleter(spec *Spec) (Deleter, error)
- func (plugin *FakeVolumePlugin) NewDetacher(name string, podUID types.UID) (Detacher, error)
- func (plugin *FakeVolumePlugin) NewMounter(spec *Spec, pod *api.Pod, opts VolumeOptions) (Mounter, error)
- func (plugin *FakeVolumePlugin) NewProvisioner(options VolumeOptions) (Provisioner, error)
- func (plugin *FakeVolumePlugin) NewRecycler(spec *Spec) (Recycler, error)
- func (plugin *FakeVolumePlugin) NewUnmounter(volName string, podUID types.UID) (Unmounter, error)
- type MockVolume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindEmptyDirectoryUsageOnTmpfs ¶
FindEmptyDirectoryUsageOnTmpfs finds the expected usage of an empty directory existing on a tmpfs filesystem on this system.
func NewFakeRecycler ¶
func NewFakeRecycler(spec *Spec, host VolumeHost, config VolumeConfig) (Recycler, error)
func NewFakeVolumeHost ¶
func ProbeVolumePlugins ¶
func ProbeVolumePlugins(config VolumeConfig) []VolumePlugin
Types ¶
type FakeDeleter ¶
type FakeDeleter struct { MetricsNil // contains filtered or unexported fields }
func (*FakeDeleter) Delete ¶
func (fd *FakeDeleter) Delete() error
func (*FakeDeleter) GetPath ¶
func (fd *FakeDeleter) GetPath() string
type FakeProvisioner ¶
type FakeProvisioner struct { Options VolumeOptions Host VolumeHost }
func (*FakeProvisioner) NewPersistentVolumeTemplate ¶
func (fc *FakeProvisioner) NewPersistentVolumeTemplate() (*api.PersistentVolume, error)
func (*FakeProvisioner) Provision ¶
func (fc *FakeProvisioner) Provision(pv *api.PersistentVolume) error
type FakeVolume ¶
type FakeVolume struct { PodUID types.UID VolName string Plugin *FakeVolumePlugin MetricsNil }
func (*FakeVolume) Attach ¶
func (fv *FakeVolume) Attach() error
func (*FakeVolume) Detach ¶
func (fv *FakeVolume) Detach() error
func (*FakeVolume) GetAttributes ¶
func (_ *FakeVolume) GetAttributes() Attributes
func (*FakeVolume) GetPath ¶
func (fv *FakeVolume) GetPath() string
func (*FakeVolume) SetUp ¶
func (fv *FakeVolume) SetUp(fsGroup *int64) error
func (*FakeVolume) TearDown ¶
func (fv *FakeVolume) TearDown() error
func (*FakeVolume) TearDownAt ¶
func (fv *FakeVolume) TearDownAt(dir string) error
type FakeVolumePlugin ¶
type FakeVolumePlugin struct { PluginName string Host VolumeHost Config VolumeConfig LastProvisionerOptions VolumeOptions NewAttacherCallCount int NewDetacherCallCount int }
FakeVolumePlugin is useful for testing. It tries to be a fully compliant plugin, but all it does is make empty directories. Use as:
volume.RegisterPlugin(&FakePlugin{"fake-name"})
func (*FakeVolumePlugin) CanSupport ¶
func (plugin *FakeVolumePlugin) CanSupport(spec *Spec) bool
func (*FakeVolumePlugin) GetAccessModes ¶
func (plugin *FakeVolumePlugin) GetAccessModes() []api.PersistentVolumeAccessMode
func (*FakeVolumePlugin) Init ¶
func (plugin *FakeVolumePlugin) Init(host VolumeHost) error
func (*FakeVolumePlugin) Name ¶
func (plugin *FakeVolumePlugin) Name() string
func (*FakeVolumePlugin) NewAttacher ¶
func (plugin *FakeVolumePlugin) NewAttacher(spec *Spec) (Attacher, error)
func (*FakeVolumePlugin) NewDeleter ¶
func (plugin *FakeVolumePlugin) NewDeleter(spec *Spec) (Deleter, error)
func (*FakeVolumePlugin) NewDetacher ¶
func (plugin *FakeVolumePlugin) NewDetacher(name string, podUID types.UID) (Detacher, error)
func (*FakeVolumePlugin) NewMounter ¶ added in v1.3.0
func (plugin *FakeVolumePlugin) NewMounter(spec *Spec, pod *api.Pod, opts VolumeOptions) (Mounter, error)
func (*FakeVolumePlugin) NewProvisioner ¶
func (plugin *FakeVolumePlugin) NewProvisioner(options VolumeOptions) (Provisioner, error)
func (*FakeVolumePlugin) NewRecycler ¶
func (plugin *FakeVolumePlugin) NewRecycler(spec *Spec) (Recycler, error)
func (*FakeVolumePlugin) NewUnmounter ¶ added in v1.3.0
func (plugin *FakeVolumePlugin) NewUnmounter(volName string, podUID types.UID) (Unmounter, error)
type MockVolume ¶
func (*MockVolume) GetMetrics ¶
func (_m *MockVolume) GetMetrics() (*Metrics, error)
GetMetrics provides a mock function with given fields:
func (*MockVolume) GetPath ¶
func (_m *MockVolume) GetPath() string
GetPath provides a mock function with given fields:
Click to show internal directories.
Click to hide internal directories.