machine

package
v1.22.12-54 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PassiveBoot  = "passive"
	ActiveBoot   = "active"
	RecoveryBoot = "recovery"
	LiveCDBoot   = "liveCD"
	NetBoot      = "netboot"
	UnknownBoot  = "unknown"
)
View Source
const EdgeVPNDefaultInstance string = "c3os"

Variables

This section is empty.

Functions

func BootFrom

func BootFrom() string

BootFrom returns the booting partition of the SUT

func CreateSentinel

func CreateSentinel(f string) error

func DotToYAML

func DotToYAML(file string) ([]byte, error)

func ExecuteCloudConfig

func ExecuteCloudConfig(file, stage string) error

func ExecuteInlineCloudConfig

func ExecuteInlineCloudConfig(cloudConfig, stage string) error

func K3sEnvUnit

func K3sEnvUnit(unit string) string

func RunBundles

func RunBundles(bundles ...[]BundleOption) error

RunBundles runs bundles in a system. Accept a list of bundles options, which gets applied based on the bundle configuration

func SentinelExist

func SentinelExist(f string) bool

func UUID

func UUID() string

Types

type BundleConfig

type BundleConfig struct {
	Target     string
	Repository string
	DBPath     string
	RootPath   string
}

func (*BundleConfig) Apply

func (bc *BundleConfig) Apply(opts ...BundleOption) error

Apply applies bundle options to the config

type BundleInstaller

type BundleInstaller interface {
	Install(*BundleConfig) error
}

func NewBundleInstaller

func NewBundleInstaller(bc BundleConfig) (BundleInstaller, error)

type BundleOption

type BundleOption func(bc *BundleConfig) error

BundleOption defines a configuration option for a bundle

func WithDBPath

func WithDBPath(r string) BundleOption

WithDBPath sets the DB path for package installs. In case of luet packages will contain the db of the installed packages

func WithRepository

func WithRepository(r string) BundleOption

func WithRootFS

func WithRootFS(r string) BundleOption

func WithTarget

func WithTarget(p string) BundleOption

type ContainerInstaller

type ContainerInstaller struct{}

func (*ContainerInstaller) Install

func (l *ContainerInstaller) Install(config *BundleConfig) error

type ContainerRunner

type ContainerRunner struct{}

BundleInstall installs a bundle from a luet repo or a container image

func (*ContainerRunner) Install

func (l *ContainerRunner) Install(config *BundleConfig) error

type LuetInstaller

type LuetInstaller struct{}

func (*LuetInstaller) Install

func (l *LuetInstaller) Install(config *BundleConfig) error

type Service

type Service interface {
	WriteUnit() error
	Start() error
	OverrideCmd(string) error
	Enable() error
	Restart() error
}

func EdgeVPN

func EdgeVPN(instance, rootDir string) (Service, error)

func Getty

func Getty(i int) (Service, error)

func K3s

func K3s() (Service, error)

func K3sAgent

func K3sAgent() (Service, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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