Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deleter ¶
type Deleter struct { *common.RuntimeConfig ProcTable ProcTable }
Deleter handles PV cleanup and object deletion For file-based volumes, it deletes the contents of the directory
func NewDeleter ¶
func NewDeleter(config *common.RuntimeConfig, procTable ProcTable) *Deleter
NewDeleter creates a Deleter object to handle the cleanup and deletion of local PVs allocated by this provisioner
type FakeProcTableImpl ¶
type FakeProcTableImpl struct { // IsRunningCount keeps count of number of times IsRunning() was called IsRunningCount int // MarkRunningCount keeps count of number of times MarkRunning() was called MarkRunningCount int // MarkDoneCount keeps count of number of times MarkDone() was called MarkDoneCount int // contains filtered or unexported fields }
FakeProcTableImpl creates a mock proc table that enables testing.
func NewFakeProcTable ¶
func NewFakeProcTable() *FakeProcTableImpl
NewFakeProcTable returns a BlockCleaner
func (*FakeProcTableImpl) IsEmpty ¶
func (f *FakeProcTableImpl) IsEmpty() bool
IsEmpty Check if any cleanup process is running
func (*FakeProcTableImpl) IsRunning ¶
func (f *FakeProcTableImpl) IsRunning(pvName string) bool
IsRunning Check if cleanup process is still running
func (*FakeProcTableImpl) MarkDone ¶
func (f *FakeProcTableImpl) MarkDone(pvName string)
MarkDone Indicate the process is no longer running or being tracked.
func (*FakeProcTableImpl) MarkRunning ¶
func (f *FakeProcTableImpl) MarkRunning(pvName string) error
MarkRunning Indicate that process is running.
type ProcTable ¶
type ProcTable interface { // CleanupBlockPV deletes block based PV IsRunning(pvName string) bool IsEmpty() bool MarkRunning(pvName string) error MarkDone(pvName string) }
ProcTable Interface for tracking running processes
type ProcTableImpl ¶
type ProcTableImpl struct {
// contains filtered or unexported fields
}
ProcTableImpl Implementation of BLockCleaner interface
func (*ProcTableImpl) IsEmpty ¶
func (v *ProcTableImpl) IsEmpty() bool
IsEmpty Check if any cleanup process is running
func (*ProcTableImpl) IsRunning ¶
func (v *ProcTableImpl) IsRunning(pvName string) bool
IsRunning Check if cleanup process is still running
func (*ProcTableImpl) MarkDone ¶
func (v *ProcTableImpl) MarkDone(pvName string)
MarkDone Indicate the process is no longer running or being tracked.
func (*ProcTableImpl) MarkRunning ¶
func (v *ProcTableImpl) MarkRunning(pvName string) error
MarkRunning Indicate that process is running.