configurer

package
v0.17.7 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Linux

type Linux struct {
	// contains filtered or unexported fields
}

Linux is a base module for various linux OS support packages

func (*Linux) Arch

func (l *Linux) Arch(h os.Host) (string, error)

Arch returns the host processor architecture in the format k0s expects it

func (*Linux) DataDirDefaultPath added in v0.15.1

func (l *Linux) DataDirDefaultPath() string

DataDirDefaultPath returns the path to the k0s data dir on the host

func (*Linux) DeleteDir added in v0.13.0

func (l *Linux) DeleteDir(h os.Host, path string, opts ...exec.Option) error

func (*Linux) DownloadK0s

func (l *Linux) DownloadK0s(h os.Host, path string, version *version.Version, arch string, opts ...exec.Option) error

DownloadK0s performs k0s binary download from github on the host

func (*Linux) DownloadURL added in v0.12.0

func (l *Linux) DownloadURL(h os.Host, url, destination string, opts ...exec.Option) error

DownloadURL performs a download from a URL on the host

func (*Linux) FileContains

func (l *Linux) FileContains(h os.Host, path, s string) bool

FileContains returns true if a file contains the substring

func (*Linux) HTTPStatus

func (l *Linux) HTTPStatus(h os.Host, url string) (int, error)

HTTPStatus makes a HTTP GET request to the url and returns the status code or an error

func (*Linux) K0sBinaryPath

func (l *Linux) K0sBinaryPath() string

K0sBinaryPath returns the path to the k0s binary on the host

func (*Linux) K0sBinaryVersion added in v0.13.0

func (l *Linux) K0sBinaryVersion(h os.Host) (*version.Version, error)

func (*Linux) K0sCmdf

func (l *Linux) K0sCmdf(template string, args ...interface{}) string

K0sCmdf can be used to construct k0s commands in sprintf style.

func (*Linux) K0sConfigPath

func (l *Linux) K0sConfigPath() string

K0sConfigPath returns the path to the k0s config file on the host

func (*Linux) K0sJoinTokenPath

func (l *Linux) K0sJoinTokenPath() string

K0sJoinTokenPath returns the path to the k0s join token file on the host

func (*Linux) K0sctlLockFilePath added in v0.13.0

func (l *Linux) K0sctlLockFilePath(h os.Host) string

K0sctlLockFilePath returns a path to a lock file

func (*Linux) KubeconfigPath

func (l *Linux) KubeconfigPath(h os.Host, dataDir string) string

KubeconfigPath returns the path to a kubeconfig on the host

func (*Linux) KubectlCmdf

func (l *Linux) KubectlCmdf(h os.Host, dataDir, s string, args ...interface{}) string

KubectlCmdf returns a command line in sprintf manner for running kubectl on the host using the kubeconfig from KubeconfigPath

func (*Linux) MachineID added in v0.15.0

func (l *Linux) MachineID(h os.Host) (string, error)

func (*Linux) MoveFile

func (l *Linux) MoveFile(h os.Host, src, dst string) error

MoveFile moves a file on the host

func (*Linux) PrivateAddress

func (l *Linux) PrivateAddress(h os.Host, iface, publicip string) (string, error)

PrivateAddress resolves internal ip from private interface

func (*Linux) PrivateInterface

func (l *Linux) PrivateInterface(h os.Host) (string, error)

PrivateInterface tries to find a private network interface

func (*Linux) ReplaceK0sTokenPath

func (l *Linux) ReplaceK0sTokenPath(h os.Host, spath string) error

ReplaceK0sTokenPath replaces the config path in the service stub

func (*Linux) SetPath added in v0.17.0

func (l *Linux) SetPath(key, value string)

SetPath sets a path for a key

func (*Linux) TempDir added in v0.8.5

func (l *Linux) TempDir(h os.Host) (string, error)

TempDir returns a temp dir path

func (*Linux) TempFile

func (l *Linux) TempFile(h os.Host) (string, error)

TempFile returns a temp file path

func (*Linux) UpsertFile added in v0.13.0

func (l *Linux) UpsertFile(h os.Host, path, content string) error

UpsertFile creates a file in path with content only if the file does not exist already

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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