Documentation ¶
Index ¶
- Constants
- Variables
- func CertDir(os OS) string
- func CloudInitCfgDir(os OS) string
- func ConfDir(os OS) string
- func CurtinInstallConfig(os OS) string
- func DataDir(os OS) string
- func JujuDumpLogs(os OS) string
- func JujuExec(os OS) string
- func JujuIntrospect(os OS) string
- func LogDir(os OS) string
- func MachineCloudInitDir(os OS) string
- func MetricsSpoolDir(os OS) string
- func PrimeLogFile(path string) error
- func SetOwnership(filePath string, wantedUser string, wantedGroup string) error
- func SetSyslogOwner(filename string) error
- func StorageDir(os OS) string
- func SyslogUserGroup() (string, string)
- func TransientDataDir(os OS) string
- type OS
Constants ¶
const ( // NixDataDir is location for agent binaries on *nix operating systems. NixDataDir = "/var/lib/juju" // NixTransientDataDir is location for storing transient data on *nix // operating systems. NixTransientDataDir = "/var/run/juju" // NixLogDir is location for Juju logs on *nix operating systems. NixLogDir = "/var/log" )
const LogfilePermission = os.FileMode(0640)
LogfilePermission is the file mode to use for log files.
Variables ¶
var Chown = os.Chown
Chown is a variable here so it can be mocked out in tests to a no-op. Agents run as root, but users don't.
Functions ¶
func CertDir ¶
CertDir returns a filesystem path to the folder used by juju to store certificates that are added by default to the Juju client api certificate pool.
func CloudInitCfgDir ¶
CloudInitCfgDir returns the absolute path to the instance cloud config directory for a particular series.
func CurtinInstallConfig ¶
CurtinInstallConfig returns the absolute path the configuration file written by Curtin during machine provisioning.
func DataDir ¶
DataDir returns a filesystem path to the folder used by juju to store tools, charms, locks, etc
func JujuDumpLogs ¶
JujuDumpLogs returns the absolute path to the juju-dumplogs binary for a particular series.
func JujuIntrospect ¶
JujuIntrospect returns the absolute path to the juju-introspect binary for a particular series.
func MachineCloudInitDir ¶
MachineCloudInitDir returns the absolute path to the instance cloudinit directory for a particular series.
func MetricsSpoolDir ¶
MetricsSpoolDir returns a filesystem path to the folder used by juju to store metrics.
func PrimeLogFile ¶
PrimeLogFile ensures that the given log file is created with the correct mode and ownership.
func SetOwnership ¶
SetOwnership sets the ownership of a given file from a path. Searches for the corresponding id's from user, group and uses them to chown.
func SetSyslogOwner ¶
SetSyslogOwner sets the owner and group of the file to be the appropriate syslog users as defined by the SyslogUserGroup method.
func StorageDir ¶
StorageDir returns a filesystem path to the folder used by juju to mount machine-level storage.
func SyslogUserGroup ¶
SyslogUserGroup returns the names of the user and group that own the log files.
func TransientDataDir ¶
TransientDataDir returns a filesystem path to the folder used by juju to store transient data that will not survive a reboot.
Types ¶
Directories ¶
Path | Synopsis |
---|---|
Package transientfile provides helpers for creating files that do not survive machine reboots.
|
Package transientfile provides helpers for creating files that do not survive machine reboots. |