path

package
v1.60.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package path contains helper functions, some OS specific, for getting paths involved in updating.

Index

Constants

View Source
const LinuxInstallDir = "/opt/observiq-otel-collector"

LinuxInstallDir is the install directory of the collector on linux.

View Source
const SysVFilePath = "/etc/init.d/observiq-otel-collector"

SysVFilePath is the path for sysv service

View Source
const SystemdFilePath = "/usr/lib/systemd/system/observiq-otel-collector.service"

SystemdFilePath is the path for systemd service

Variables

This section is empty.

Functions

func BackupDir

func BackupDir(installDir string) string

BackupDir gets the path to the "rollback" dir, where current artifacts are backed up.

func BackupServiceFile

func BackupServiceFile(installDir string) string

BackupServiceFile returns the full path to the backup service file

func InstallDir

func InstallDir(_ *zap.Logger) (string, error)

InstallDir returns the filepath to the install directory

func LatestDir

func LatestDir(installDir string) string

LatestDir gets the path to the "latest" dir, where the new artifacts are unpacked.

func LatestJMXJarFile

func LatestJMXJarFile(latestDir string) string

LatestJMXJarFile returns the full path to the latest JMX jar to be installed

func LinuxServiceCmdName added in v1.47.0

func LinuxServiceCmdName() string

LinuxServiceCmdName returns the filename of the service command available on this Linux OS. Will be one of systemctl and service

func LinuxServiceFilePath added in v1.47.0

func LinuxServiceFilePath() string

LinuxServiceFilePath returns the full path to the service file

func LogFile

func LogFile(installDir string) string

LogFile returns the full path to the log file for the updater

func ServiceFileDir

func ServiceFileDir(installDir string) string

ServiceFileDir gets the directory of the service file definitions

func SpecialJMXJarFile

func SpecialJMXJarFile(installDir string) string

SpecialJMXJarFile returns the full path to the JMX Jar on linux and darwin installs

func SpecialJarDir

func SpecialJarDir(installDir string) string

SpecialJarDir gets the directory where linux and darwin installs put the JMX jar Keeping this relative for now so we don't have to deal with /opt in tests

func TempDir

func TempDir(installDir string) string

TempDir gets the path to the "tmp" dir, used for staging updates & backups

Types

This section is empty.

Jump to

Keyboard shortcuts

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