Documentation ¶
Overview ¶
Code generated by MockGen. DO NOT EDIT. Source: imagemgmt.go
Generated by this command:
mockgen -source=imagemgmt.go -package=imagemgmt -destination=mock_imagemgmt.go
Package imagemgmt is a generated GoMock package.
Index ¶
- type ImageMgmtClient
- func (c *ImageMgmtClient) CheckDiskUsageAgainstThreshold(thresholdPercent int) (bool, error)
- func (c *ImageMgmtClient) CleanupUnusedImages(thresholdPercent int) error
- func (c *ImageMgmtClient) GetInuseImages() (inUse []string, rc error)
- func (c *ImageMgmtClient) GetPinnedImages() (pinned []string, rc error)
- func (c *ImageMgmtClient) GetRemovalCandidates() (removalCandidates []imageMgmtImageInfo, rc error)
- type ImageMgmtIntf
- type MockImageMgmtIntf
- func (m *MockImageMgmtIntf) CheckDiskUsageAgainstThreshold(thresholdPercent int) (bool, error)
- func (m *MockImageMgmtIntf) CleanupUnusedImages(thresholdPercent int) error
- func (m *MockImageMgmtIntf) EXPECT() *MockImageMgmtIntfMockRecorder
- func (m *MockImageMgmtIntf) GetInuseImages() ([]string, error)
- func (m *MockImageMgmtIntf) GetPinnedImages() ([]string, error)
- func (m *MockImageMgmtIntf) GetRemovalCandidates() ([]imageMgmtImageInfo, error)
- type MockImageMgmtIntfMockRecorder
- func (mr *MockImageMgmtIntfMockRecorder) CheckDiskUsageAgainstThreshold(thresholdPercent any) *gomock.Call
- func (mr *MockImageMgmtIntfMockRecorder) CleanupUnusedImages(thresholdPercent any) *gomock.Call
- func (mr *MockImageMgmtIntfMockRecorder) GetInuseImages() *gomock.Call
- func (mr *MockImageMgmtIntfMockRecorder) GetPinnedImages() *gomock.Call
- func (mr *MockImageMgmtIntfMockRecorder) GetRemovalCandidates() *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageMgmtClient ¶
func (*ImageMgmtClient) CheckDiskUsageAgainstThreshold ¶
func (c *ImageMgmtClient) CheckDiskUsageAgainstThreshold(thresholdPercent int) (bool, error)
CheckDiskUsageAgainstThreshold gets the disk usage for the specified path and checks whether it exceeds the specified threshold
func (*ImageMgmtClient) CleanupUnusedImages ¶
func (c *ImageMgmtClient) CleanupUnusedImages(thresholdPercent int) error
CleanupUnusedImages iterates through the image removal candidates, deleting in sets of 5 until the container storage disk usage threshold is met
func (*ImageMgmtClient) GetInuseImages ¶
func (c *ImageMgmtClient) GetInuseImages() (inUse []string, rc error)
GetInuseImages gets the list of images in use by cri-o or podman containers
func (*ImageMgmtClient) GetPinnedImages ¶
func (c *ImageMgmtClient) GetPinnedImages() (pinned []string, rc error)
GetPinnedImages gets the list of pinned images, from crictl
func (*ImageMgmtClient) GetRemovalCandidates ¶
func (c *ImageMgmtClient) GetRemovalCandidates() (removalCandidates []imageMgmtImageInfo, rc error)
GetRemovalCandidates gets the list of images sorted by creation timestamp, filtering out in-use and pinned images
type ImageMgmtIntf ¶
type ImageMgmtIntf interface { CheckDiskUsageAgainstThreshold(thresholdPercent int) (bool, error) GetInuseImages() (inUse []string, rc error) GetPinnedImages() (pinned []string, rc error) GetRemovalCandidates() (removalCandidates []imageMgmtImageInfo, rc error) CleanupUnusedImages(thresholdPercent int) error }
ImageMgmtIntf is an interface for LCA iamge management commands.
func NewImageMgmtClient ¶
func NewImageMgmtClient(log *logr.Logger, hostCommandsExecutor ops.Execute, storagePath string) ImageMgmtIntf
NewImageMgmtClient creates and returns a ImageMgmtIntf interface for image management commands
type MockImageMgmtIntf ¶
type MockImageMgmtIntf struct {
// contains filtered or unexported fields
}
MockImageMgmtIntf is a mock of ImageMgmtIntf interface.
func NewMockImageMgmtIntf ¶
func NewMockImageMgmtIntf(ctrl *gomock.Controller) *MockImageMgmtIntf
NewMockImageMgmtIntf creates a new mock instance.
func (*MockImageMgmtIntf) CheckDiskUsageAgainstThreshold ¶
func (m *MockImageMgmtIntf) CheckDiskUsageAgainstThreshold(thresholdPercent int) (bool, error)
CheckDiskUsageAgainstThreshold mocks base method.
func (*MockImageMgmtIntf) CleanupUnusedImages ¶
func (m *MockImageMgmtIntf) CleanupUnusedImages(thresholdPercent int) error
CleanupUnusedImages mocks base method.
func (*MockImageMgmtIntf) EXPECT ¶
func (m *MockImageMgmtIntf) EXPECT() *MockImageMgmtIntfMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockImageMgmtIntf) GetInuseImages ¶
func (m *MockImageMgmtIntf) GetInuseImages() ([]string, error)
GetInuseImages mocks base method.
func (*MockImageMgmtIntf) GetPinnedImages ¶
func (m *MockImageMgmtIntf) GetPinnedImages() ([]string, error)
GetPinnedImages mocks base method.
func (*MockImageMgmtIntf) GetRemovalCandidates ¶
func (m *MockImageMgmtIntf) GetRemovalCandidates() ([]imageMgmtImageInfo, error)
GetRemovalCandidates mocks base method.
type MockImageMgmtIntfMockRecorder ¶
type MockImageMgmtIntfMockRecorder struct {
// contains filtered or unexported fields
}
MockImageMgmtIntfMockRecorder is the mock recorder for MockImageMgmtIntf.
func (*MockImageMgmtIntfMockRecorder) CheckDiskUsageAgainstThreshold ¶
func (mr *MockImageMgmtIntfMockRecorder) CheckDiskUsageAgainstThreshold(thresholdPercent any) *gomock.Call
CheckDiskUsageAgainstThreshold indicates an expected call of CheckDiskUsageAgainstThreshold.
func (*MockImageMgmtIntfMockRecorder) CleanupUnusedImages ¶
func (mr *MockImageMgmtIntfMockRecorder) CleanupUnusedImages(thresholdPercent any) *gomock.Call
CleanupUnusedImages indicates an expected call of CleanupUnusedImages.
func (*MockImageMgmtIntfMockRecorder) GetInuseImages ¶
func (mr *MockImageMgmtIntfMockRecorder) GetInuseImages() *gomock.Call
GetInuseImages indicates an expected call of GetInuseImages.
func (*MockImageMgmtIntfMockRecorder) GetPinnedImages ¶
func (mr *MockImageMgmtIntfMockRecorder) GetPinnedImages() *gomock.Call
GetPinnedImages indicates an expected call of GetPinnedImages.
func (*MockImageMgmtIntfMockRecorder) GetRemovalCandidates ¶
func (mr *MockImageMgmtIntfMockRecorder) GetRemovalCandidates() *gomock.Call
GetRemovalCandidates indicates an expected call of GetRemovalCandidates.