utils

package
v0.0.0-...-6e377b6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Code generated by MockGen. DO NOT EDIT. Source: filesystem_helper.go

Generated by this command:

mockgen -source=filesystem_helper.go -package=utils -destination=mock_filesystem_helper.go

Package utils is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDevicePluginNodeLabel

func GetDevicePluginNodeLabel(namespace, moduleName string) string

func GetDevicePluginVersionLabelName

func GetDevicePluginVersionLabelName(namespace, name string) string

func GetKernelModuleReadyNodeLabel

func GetKernelModuleReadyNodeLabel(namespace, moduleName string) string

func GetModuleVersionLabelName

func GetModuleVersionLabelName(namespace, name string) string

func GetNamespaceNameFromVersionLabel

func GetNamespaceNameFromVersionLabel(label string) (string, string, error)

func GetNodeWorkerPodVersionLabel

func GetNodeWorkerPodVersionLabel(nodeLabels map[string]string, namespace, name string) (string, bool)

func GetNodesVersionLabels

func GetNodesVersionLabels(nodeLabels map[string]string) map[string]string

func GetWorkerPodVersionLabelName

func GetWorkerPodVersionLabelName(namespace, name string) string

func IsDeprecatedKernelModuleReadyNodeLabel

func IsDeprecatedKernelModuleReadyNodeLabel(label string) bool

func IsDevicePluginVersionLabel

func IsDevicePluginVersionLabel(label string) bool

func IsKernelModuleReadyNodeLabel

func IsKernelModuleReadyNodeLabel(label string) (bool, string, string)

func IsModuleVersionLabel

func IsModuleVersionLabel(label string) bool

func IsObjectSelectedByLabels

func IsObjectSelectedByLabels(objectLabels map[string]string, selectorLabels map[string]string) (bool, error)

func IsVersionLabel

func IsVersionLabel(label string) bool

func IsWorkerPodVersionLabel

func IsWorkerPodVersionLabel(label string) bool

func KernelComponentsAsEnvVars

func KernelComponentsAsEnvVars(kernel string) []string

func MakeSecretVolume

func MakeSecretVolume(secretRef *v1.LocalObjectReference, key string, path string) v1.Volume

func MakeSecretVolumeMount

func MakeSecretVolumeMount(secretRef *v1.LocalObjectReference, mountPath string, readOnly bool) v1.VolumeMount

func ReplaceInTemplates

func ReplaceInTemplates(envvars []string, templates ...string) ([]string, error)

func WarnString

func WarnString(str string) string

Types

type FSHelper

type FSHelper interface {
	RemoveSrcFilesFromDst(srcDir, dstDir string) error
	FileExists(root, fileRegex string) (bool, error)
}

func NewFSHelper

func NewFSHelper(logger logr.Logger) FSHelper

type MockFSHelper

type MockFSHelper struct {
	// contains filtered or unexported fields
}

MockFSHelper is a mock of FSHelper interface.

func NewMockFSHelper

func NewMockFSHelper(ctrl *gomock.Controller) *MockFSHelper

NewMockFSHelper creates a new mock instance.

func (*MockFSHelper) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockFSHelper) FileExists

func (m *MockFSHelper) FileExists(root, fileRegex string) (bool, error)

FileExists mocks base method.

func (*MockFSHelper) RemoveSrcFilesFromDst

func (m *MockFSHelper) RemoveSrcFilesFromDst(srcDir, dstDir string) error

RemoveSrcFilesFromDst mocks base method.

type MockFSHelperMockRecorder

type MockFSHelperMockRecorder struct {
	// contains filtered or unexported fields
}

MockFSHelperMockRecorder is the mock recorder for MockFSHelper.

func (*MockFSHelperMockRecorder) FileExists

func (mr *MockFSHelperMockRecorder) FileExists(root, fileRegex any) *gomock.Call

FileExists indicates an expected call of FileExists.

func (*MockFSHelperMockRecorder) RemoveSrcFilesFromDst

func (mr *MockFSHelperMockRecorder) RemoveSrcFilesFromDst(srcDir, dstDir any) *gomock.Call

RemoveSrcFilesFromDst indicates an expected call of RemoveSrcFilesFromDst.

Directories

Path Synopsis
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL