configurer

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: Apache-2.0 Imports: 7 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 {
	PathFuncs
}

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) Chmod

func (l Linux) Chmod(h os.Host, path, chmod string) error

Chmod changes file permissions

func (Linux) DeleteFile

func (l Linux) DeleteFile(h os.Host, path string) error

DeleteFile deletes a file on the host

func (Linux) DownloadK0s

func (l Linux) DownloadK0s(h os.Host, version, arch string) error

DownloadK0s performs k0s binary download from github 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 location of k0s binary

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 location of k0s configuration file

func (Linux) K0sJoinTokenPath

func (l Linux) K0sJoinTokenPath() string

K0sJoinTokenPath returns the location of k0s join token file

func (Linux) KubeconfigPath

func (l Linux) KubeconfigPath() string

KubeconfigPath returns the path to a kubeconfig on the host

func (Linux) KubectlCmdf

func (l Linux) KubectlCmdf(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) 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) 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

type PathFuncs added in v0.11.3

type PathFuncs interface {
	K0sBinaryPath() string
	K0sConfigPath() string
	K0sJoinTokenPath() string
	KubeconfigPath() string
}

Static Constants Interface for overriding by distro-specific structs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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