system

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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

func CopyComponent(src, dst string, remount bool, key string) (bool, error)

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

func DataPath(elem ...string) string

DataPath joins any number of elements into a single path underneath the persistent state root, by default `DefaultDataDir`

func LocalPath

func LocalPath(elem ...string) string

LocalPath joins any number of elements into a single path underneath the persistent configuration root, by default `DefaultLocalDir`

func RootPath

func RootPath(elem ...string) string

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.

func StatePath

func StatePath(elem ...string) string

StatePath joins any number of elements into a single path underneath the ephemeral state root, by default `DefaultStateDir`

Types

type VersionName added in v0.9.0

type VersionName string
const (
	VersionCurrent  VersionName = "current"
	VersionPrevious VersionName = "previous"
)

Jump to

Keyboard shortcuts

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