Documentation
¶
Index ¶
- func CheckIfPathExist(path string) bool
- func CheckIfServiceIsActive(serv string) (bool, error)
- func CheckIfServiceIsInstalled(serv string) (bool, error)
- func CreateLinuxService(serviceName string, execStart string) error
- func CreateLogger(filename string) *logger.Logger
- func CreatePathIfNotExist(path string) error
- func DetectLinuxFamily() (string, error)
- func Execute(c string, dir string, arg ...string) error
- func ExecuteWithResult(c string, dir string, arg ...string) (string, bool)
- func FindLatestLog(path string, pattern *regexp.Regexp) (string, error)
- func GenerateCerts(folder string) error
- func GenerateFromTemplate(data interface{}, tfile string, cfile string) error
- func GenerateKey(REPALCE_KEY string) ([]byte, error)
- func GenerateKeyByUUID(REPLACE_KEY string, uuid string) ([]byte, error)
- func GetHostAliases(hostname string) ([]string, error)
- func GetIPAddress() (string, error)
- func GetMyPath() (string, error)
- func IncrementReconnectDelay(delay time.Duration, maxReconnectDelay time.Duration) time.Duration
- func IncrementReconnectTime(currentTime time.Duration, delay time.Duration, maxReconnectTime time.Duration) time.Duration
- func IsDirEmpty(path string) (bool, error)
- func IsPortUsed(proto string, port string) bool
- func LoadTLSCredentials(crtName string) (credentials.TransportCredentials, error)
- func ReadFileLines(path string) ([]string, error)
- func ReadJson(fileName string, data interface{}) error
- func ReadYAML(path string, result interface{}) error
- func RestartService(serv string) error
- func SentLog(msg string) error
- func StopService(name string) error
- func TailLogFile(filePath string, logLinesChan chan []string, stopChan chan bool, ...)
- func UninstallService(name string) error
- func WatchFolder(logType string, logsPath string, logLinesChan chan []string, batchCapacity int, ...)
- func WriteJSON(path string, data interface{}) error
- func WriteYAML(url string, data interface{}) error
- type OSInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIfPathExist ¶
func CheckIfServiceIsActive ¶
CheckIfServiceIsActive checks if a service is active or running
func CheckIfServiceIsInstalled ¶
CheckIfServiceIsInstalled checks if a service is installed
func CreateLinuxService ¶
func CreateLogger ¶
CreateLogger returns a single instance of a Logger configured to save logs to a rotating file.
func CreatePathIfNotExist ¶
CreatePathIfNotExist creates a specific path if not exist
func DetectLinuxFamily ¶
func GenerateCerts ¶
func GenerateFromTemplate ¶
func GenerateKey ¶
func GetHostAliases ¶
func GetIPAddress ¶
func GetMyPath ¶
GetMyPath returns the directory path where the currently running executable is located. Returns a string representing the directory path, and an error if any error occurs during the process.
func IncrementReconnectDelay ¶
func IncrementReconnectTime ¶
func IsDirEmpty ¶
func IsPortUsed ¶
func LoadTLSCredentials ¶
func LoadTLSCredentials(crtName string) (credentials.TransportCredentials, error)
func ReadFileLines ¶
func ReadYAML ¶
ReadYAML reads the YAML data from the specified file URL and deserializes it into the provided result interface{}. Returns an error if any error occurs during the process.
func StopService ¶
func TailLogFile ¶
func UninstallService ¶
func WatchFolder ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.