util

package
v0.0.0-...-881e6dc Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanUseVersion

func CanUseVersion(maj1 int, min1 int, patch1 int, sub1 string, build1 int,
	maj2 int, min2 int, patch2 int, sub2 string, build2 int,
	updatePolicy string) bool

func ChownRmarlinctlDir

func ChownRmarlinctlDir() error

func CreateDirPathIfNotExists

func CreateDirPathIfNotExists(dirPath string) error

func DecodeVersionString

func DecodeVersionString(verString string) (int, int, int, string, int, error)

func DownloadExecutable

func DownloadExecutable(exectype string, version string, url string, skipchecksum bool, checksum string, filelocation string) error

func DownloadFile

func DownloadFile(filepath string, url string) error

func ExpandTilde

func ExpandTilde(path string) string

func GetFileSeekOffsetLastNLines

func GetFileSeekOffsetLastNLines(fname string, lines int) int64

func GetRuntimes

func GetRuntimes() map[string]bool

func GetTable

func GetTable() table.Writer

func GetUser

func GetUser() (*user.User, error)

func GitPullHead

func GitPullHead(upstreamUrl string, branch string, dirPath string) error

func IsCommandAvailable

func IsCommandAvailable(name string) bool

func IsHigherVersion

func IsHigherVersion(maj1 int, min1 int, patch1 int,
	maj2 int, min2 int, patch2 int, sub2 string) bool

func IsSupervisorAvailable

func IsSupervisorAvailable() bool

func IsSupervisorInRunningState

func IsSupervisorInRunningState() bool

func IsSystemdAvailable

func IsSystemdAvailable() bool

func IsValidSubscription

func IsValidSubscription(subscription string) bool

func IsValidUpdatePolicy

func IsValidUpdatePolicy(updatePolicy string) bool

func LogTailer

func LogTailer(program []string, instanceID string, lines int) error

func MoveDir

func MoveDir(srcDir string, dstDir string) error

func PrettyPrintKVMap

func PrettyPrintKVMap(s map[string]interface{})

func PrettyPrintKVStruct

func PrettyPrintKVStruct(s interface{})

func PrintPrettyDiff

func PrintPrettyDiff(message string)

func ReadInputPasswordLine

func ReadInputPasswordLine() (string, error)

func ReadStringFromFile

func ReadStringFromFile(filePath string) (string, error)

func RemoveConfigEntry

func RemoveConfigEntry(key string) error

func RemoveDirContents

func RemoveDirContents(dirPath string) error

func RemoveDirPathIfExists

func RemoveDirPathIfExists(dirPath string) error

func SupervisorRereadUpdate

func SupervisorRereadUpdate() error

func SupervisorRestartProgramBestEffort

func SupervisorRestartProgramBestEffort(exectype string, program string)

func SupervisorStart

func SupervisorStart(programs []string) error

func SupervisorStatusBestEffort

func SupervisorStatusBestEffort(programs []string, instanceID string)

func SupervisorStop

func SupervisorStop(program []string) []error

func TrimSpacesEveryLine

func TrimSpacesEveryLine(s string) string

func VerifyChecksum

func VerifyChecksum(filepath string, md5hash string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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