Documentation ¶
Index ¶
- type Linux
- func (l *Linux) Arch(h os.Host) (string, error)
- func (l *Linux) DataDirDefaultPath() string
- func (l *Linux) DeleteDir(h os.Host, path string, opts ...exec.Option) error
- func (l *Linux) DownloadK0s(h os.Host, path string, version *version.Version, arch string, ...) error
- func (l *Linux) DownloadURL(h os.Host, url, destination string, opts ...exec.Option) error
- func (l *Linux) FileContains(h os.Host, path, s string) bool
- func (l *Linux) HTTPStatus(h os.Host, url string) (int, error)
- func (l *Linux) K0sBinaryPath() string
- func (l *Linux) K0sBinaryVersion(h os.Host) (*version.Version, error)
- func (l *Linux) K0sCmdf(template string, args ...interface{}) string
- func (l *Linux) K0sConfigPath() string
- func (l *Linux) K0sJoinTokenPath() string
- func (l *Linux) K0sctlLockFilePath(h os.Host) string
- func (l *Linux) KubeconfigPath(h os.Host, dataDir string) string
- func (l *Linux) KubectlCmdf(h os.Host, dataDir, s string, args ...interface{}) string
- func (l *Linux) MachineID(h os.Host) (string, error)
- func (l *Linux) MoveFile(h os.Host, src, dst string) error
- func (l *Linux) PrivateAddress(h os.Host, iface, publicip string) (string, error)
- func (l *Linux) PrivateInterface(h os.Host) (string, error)
- func (l *Linux) ReplaceK0sTokenPath(h os.Host, spath string) error
- func (l *Linux) SetPath(key, value string)
- func (l *Linux) TempDir(h os.Host) (string, error)
- func (l *Linux) TempFile(h os.Host) (string, error)
- func (l *Linux) UpsertFile(h os.Host, path, content string) error
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) DataDirDefaultPath ¶ added in v0.15.1
DataDirDefaultPath returns the path to the k0s data dir on the host
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
DownloadURL performs a download from a URL on the host
func (*Linux) FileContains ¶
FileContains returns true if a file contains the substring
func (*Linux) HTTPStatus ¶
HTTPStatus makes a HTTP GET request to the url and returns the status code or an error
func (*Linux) K0sBinaryPath ¶
K0sBinaryPath returns the path to the k0s binary on the host
func (*Linux) K0sBinaryVersion ¶ added in v0.13.0
func (*Linux) K0sConfigPath ¶
K0sConfigPath returns the path to the k0s config file on the host
func (*Linux) K0sJoinTokenPath ¶
K0sJoinTokenPath returns the path to the k0s join token file on the host
func (*Linux) K0sctlLockFilePath ¶ added in v0.13.0
K0sctlLockFilePath returns a path to a lock file
func (*Linux) KubeconfigPath ¶
KubeconfigPath returns the path to a kubeconfig on the host
func (*Linux) KubectlCmdf ¶
KubectlCmdf returns a command line in sprintf manner for running kubectl on the host using the kubeconfig from KubeconfigPath
func (*Linux) PrivateAddress ¶
PrivateAddress resolves internal ip from private interface
func (*Linux) PrivateInterface ¶
PrivateInterface tries to find a private network interface
func (*Linux) ReplaceK0sTokenPath ¶
ReplaceK0sTokenPath replaces the config path in the service stub