Documentation ¶
Index ¶
- Constants
- func CopyComponent(src, dst string, remount bool, key string) (bool, error)
- func DataPath(elem ...string) string
- func LocalPath(elem ...string) string
- func RootPath(elem ...string) string
- func StatComponentVersion(root, key string, alias VersionName) (os.FileInfo, error)
- func StatePath(elem ...string) string
- type VersionName
Constants ¶
View Source
const ( // DefaultRootDir represents where persistent installations are located DefaultRootDir = "/k3os/system" // DefaultDataDir represents where persistent state is located DefaultDataDir = "/k3os/data" // DefaultLocalDir represents where local, persistent configuration is located DefaultLocalDir = "/var/lib/rancher/k3os" // DefaultStateDir represents where ephemeral state is located DefaultStateDir = "/run/k3os" )
Variables ¶
This section is empty.
Functions ¶
func CopyComponent ¶ added in v0.9.0
CopyComponent will copy the component identified by `key` from `src` to `dst`, moving the `current` symlink to the version from `src` (after renaming `current` to `previous`).
func DataPath ¶
DataPath joins any number of elements into a single path underneath the persistent state root, by default `DefaultDataDir`
func LocalPath ¶
LocalPath joins any number of elements into a single path underneath the persistent configuration root, by default `DefaultLocalDir`
func RootPath ¶
RootPath joins any number of elements into a single path underneath the persistent installation root, by default `DefaultRootDir`
func StatComponentVersion ¶ added in v0.9.0
func StatComponentVersion(root, key string, alias VersionName) (os.FileInfo, error)
StatComponentVersion will de-reference the version symlink for the component.
Types ¶
type VersionName ¶ added in v0.9.0
type VersionName string
const ( VersionCurrent VersionName = "current" VersionPrevious VersionName = "previous" )
Click to show internal directories.
Click to hide internal directories.