Documentation ¶
Overview ¶
Package path contains helper functions, some OS specific, for getting paths involved in updating.
Index ¶
- Constants
- func BackupDir(installDir string) string
- func BackupServiceFile(installDir string) string
- func InstallDir(_ *zap.Logger) (string, error)
- func LatestDir(installDir string) string
- func LatestJMXJarFile(latestDir string) string
- func LinuxServiceCmdName() string
- func LinuxServiceFilePath() string
- func LogFile(installDir string) string
- func ServiceFileDir(installDir string) string
- func SpecialJMXJarFile(installDir string) string
- func SpecialJarDir(installDir string) string
- func TempDir(installDir string) string
Constants ¶
const LinuxInstallDir = "/opt/observiq-otel-collector"
LinuxInstallDir is the install directory of the collector on linux.
const SysVFilePath = "/etc/init.d/observiq-otel-collector"
SysVFilePath is the path for sysv service
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 ¶
BackupDir gets the path to the "rollback" dir, where current artifacts are backed up.
func BackupServiceFile ¶
BackupServiceFile returns the full path to the backup service file
func InstallDir ¶
InstallDir returns the filepath to the install directory
func LatestJMXJarFile ¶
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 ServiceFileDir ¶
ServiceFileDir gets the directory of the service file definitions
func SpecialJMXJarFile ¶
SpecialJMXJarFile returns the full path to the JMX Jar on linux and darwin installs
func SpecialJarDir ¶
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
Types ¶
This section is empty.