harvester

package
v0.0.0-...-97f892d Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupFile

func BackupFile(source string) (string, error)

func BackupFileToDir

func BackupFileToDir(sourcePath, dstDir string) (string, error)

func GenerateTempFile

func GenerateTempFile(buf []byte, prefix string) (string, error)

Generate Temp file with buffer, return the file name

func GenerateTempFileFullOptions

func GenerateTempFileFullOptions(buf []byte, prefix, dirPath string, perm fs.FileMode) (string, error)

Generate Temp file with buffer, directory and permission, return the file name

func GenerateTempFileWithDir

func GenerateTempFileWithDir(buf []byte, prefix, dirPath string) (string, error)

Generate Temp file with buffer and directory, return the fullpath

func GenerateTempFileWithPerm

func GenerateTempFileWithPerm(buf []byte, prefix string, perm fs.FileMode) (string, error)

Generate Temp file with buffer and permission, return the file name

func GenerateYAMLTempFile

func GenerateYAMLTempFile(obj interface{}, prefix string) (string, error)

Generate Temp file with YAML content, return the file name

func GenerateYAMLTempFileFullOptions

func GenerateYAMLTempFileFullOptions(obj interface{}, prefix, dirPath string, perm fs.FileMode) (string, error)

Generate Temp file with YAML content and permission, return the file name

func GenerateYAMLTempFileWithDir

func GenerateYAMLTempFileWithDir(obj interface{}, prefix, dirPath string) (string, error)

func GenerateYAMLTempFileWithPerm

func GenerateYAMLTempFileWithPerm(obj interface{}, prefix string, perm fs.FileMode) (string, error)

func GetFileName

func GetFileName(path string) string

func RemoveFiles

func RemoveFiles(path ...string) error

func RestartService

func RestartService(unit string) error

func WatchDBusSignal

func WatchDBusSignal(ctx context.Context, iface, objPath string, handlerFunc func(s *dbus.Signal))

func WatchFileChange

func WatchFileChange(ctx context.Context, handlerFunc func(eventType string), monitorTargets []string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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