settings

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WhitelistDomain = newSetting("whitelist-domain", "", "the domains or ips which allowed in autok3s UI proxy")
	EnableMetrics   = newSetting("enable-metrics", "promote", "Should enable telemetry or not")
	InstallUUID     = newSetting("install-uuid", "", "The autok3s instance unique install id")

	InstallScript         = newSetting("install-script", "", "The k3s offline install script with base64 encode")
	ScriptUpdateSource    = newSetting("install-script-source-repo", "https://rancher-mirror.rancher.cn/k3s/k3s-install.sh", "The install script auto update source, github or aliyun oss")
	PackageDownloadSource = newSetting("package-download-source", "github", "The airgap package download source, github and aliyunoss are validated.")

	HelmDashboardEnabled = newSetting("helm-dashboard-enabled", "false", "The helm-dashboard is enabled or not")
	HelmDashboardPort    = newSetting("helm-dashboard-port", "", "The helm-dashboard server port after enabled")
)

Functions

func GetScriptFromSource added in v0.6.0

func GetScriptFromSource(writer io.Writer) error

func SetProvider

func SetProvider(p Provider) error

SetProvider will set the given provider as the global provider for all settings

Types

type Provider

type Provider interface {
	Get(name string) string
	Set(name, value string) error
	SetIfUnset(name, value string) error
	SetAll(settings map[string]Setting) error
}

type Setting

type Setting struct {
	Name        string
	Default     string
	Description string
}

func (Setting) Get

func (s Setting) Get() string

func (Setting) Set

func (s Setting) Set(value string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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