utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CompilePluginSubFolder = "plugins/compile"

CompilePluginSubFolder plugins complied folder

View Source
const PluginSourceSubFolder = "plugins/source"

PluginSourceSubFolder plugin source folder

Variables

This section is empty.

Functions

func AddNewLineToNonEmptyStr

func AddNewLineToNonEmptyStr(str string) string

AddNewLineToNonEmptyStr add new line to non empty string

func CreateBenchmarkFolderIfNotExist

func CreateBenchmarkFolderIfNotExist(spec, version string, fm FolderMgr) error

CreateBenchmarkFolderIfNotExist create lxd-probe benchmark folder if not exist

func CreateHomeFolderIfNotExist

func CreateHomeFolderIfNotExist(fm FolderMgr) error

CreateHomeFolderIfNotExist create lxd-probe home folder if not exist

func CreatePluginsCompiledFolderIfNotExist

func CreatePluginsCompiledFolderIfNotExist(fm FolderMgr) error

CreatePluginsCompiledFolderIfNotExist create plugins compiled folder if not exist

func CreatePluginsSourceFolderIfNotExist

func CreatePluginsSourceFolderIfNotExist(fm FolderMgr) error

CreatePluginsSourceFolderIfNotExist plugins source folder if not exist

func GetAuditTestsList

func GetAuditTestsList(key, arg string) []string

GetAuditTestsList return processing function by specificTests

func GetBenchmarkFolder

func GetBenchmarkFolder(spec, version string, fm FolderMgr) (string, error)

GetBenchmarkFolder return benchmark folder

func GetCompilePluginSubFolder

func GetCompilePluginSubFolder(fm FolderMgr) (string, error)

GetCompilePluginSubFolder return plugin compiled folder path

func GetEnv

func GetEnv(key, fallback string) string

GetEnv Get Environment Variable value or return default

func GetHomeFolder

func GetHomeFolder() string

GetHomeFolder return lxd-probe home folder

func GetPluginSourceSubFolder

func GetPluginSourceSubFolder(fm FolderMgr) (string, error)

GetPluginSourceSubFolder return plugins source folder path

func RemoveNewLineSuffix

func RemoveNewLineSuffix(str string) string

RemoveNewLineSuffix remove new line from suffix

Types

type FilesInfo

type FilesInfo struct {
	Name string
	Data string
}

FilesInfo file data

func GetLxdBenchAuditFiles

func GetLxdBenchAuditFiles(spec, version string, fm FolderMgr) ([]FilesInfo, error)

GetLxdBenchAuditFiles return lxd benchmark file

type FolderMgr

type FolderMgr interface {
	CreateFolder(folderName string) error
	GetHomeFolder() (string, error)
}

FolderMgr defines the interface for kube-knark folder fileutil.go

func NewKFolder

func NewKFolder() FolderMgr

NewKFolder return bFolder instance

Jump to

Keyboard shortcuts

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