Documentation ¶
Index ¶
- Variables
- func GetCmdDisableSystemdService(serviceName string) *exec.Cmd
- func GetCmdEnableSystemdService(serviceName string) *exec.Cmd
- func GetCmdIsSystemdEnabled() *exec.Cmd
- func GetCmdReloadSystemdDaemon() *exec.Cmd
- func GetCmdResetFailedSystemService(serviceName string) *exec.Cmd
- func GetCmdStartSystemdService(serviceName string) *exec.Cmd
- func GetCmdStopSystemdService(serviceName string) *exec.Cmd
- func GetConfigHome() string
- func GetDataHome() string
- func GetPlatform() types.Platform
- func GetRuntimeDir() string
- func HashPrometheusPassword(password string) ([]byte, error)
- func IsLingeringEnabled(user string) bool
- func IsSystemdUserEnabled() bool
- func NewSystemdServiceInfo(platform types.Platform) *systemdServiceInfo
- func ScrapeConfigForPrometheus(info PrometheusInfo) string
- func ScrapeWebConfigForPrometheus(info PrometheusInfo) string
- type ConfigFileHandler
- type ConfigFileHandlerCommon
- func (l *ConfigFileHandlerCommon) GetData() interface{}
- func (l *ConfigFileHandlerCommon) GetFilename() string
- func (l *ConfigFileHandlerCommon) Load() error
- func (l *ConfigFileHandlerCommon) Save() error
- func (l *ConfigFileHandlerCommon) SetData(data interface{})
- func (l *ConfigFileHandlerCommon) SetFileName(name string)
- type PlatformInfo
- type PrometheusInfo
- type StartupScripts
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //go:embed prometheus.yml.template PrometheusConfig string //go:embed prometheus-web-config.yml.template WebConfigForPrometheus string )
View Source
var ( //go:embed startsh-podman.template StartScriptPodmanTemplate string //go:embed stopsh-podman.template StopScriptPodmanTemplate string )
View Source
var (
Platform string
)
View Source
var (
PlatformConfigFile = path.Join(GetDataHome(), "platform.yaml")
)
View Source
var ( //go:embed systemd_service.template SystemdServiceTemplate string )
Functions ¶
func GetCmdIsSystemdEnabled ¶
func GetConfigHome ¶
func GetConfigHome() string
func GetDataHome ¶
func GetDataHome() string
func GetPlatform ¶
func GetRuntimeDir ¶
func GetRuntimeDir() string
func HashPrometheusPassword ¶
func IsLingeringEnabled ¶
func IsSystemdUserEnabled ¶
func IsSystemdUserEnabled() bool
func NewSystemdServiceInfo ¶
func ScrapeConfigForPrometheus ¶
func ScrapeConfigForPrometheus(info PrometheusInfo) string
func ScrapeWebConfigForPrometheus ¶
func ScrapeWebConfigForPrometheus(info PrometheusInfo) string
Types ¶
type ConfigFileHandler ¶
type ConfigFileHandlerCommon ¶
type ConfigFileHandlerCommon struct {
// contains filtered or unexported fields
}
func (*ConfigFileHandlerCommon) GetData ¶
func (l *ConfigFileHandlerCommon) GetData() interface{}
func (*ConfigFileHandlerCommon) GetFilename ¶
func (l *ConfigFileHandlerCommon) GetFilename() string
func (*ConfigFileHandlerCommon) Load ¶
func (l *ConfigFileHandlerCommon) Load() error
func (*ConfigFileHandlerCommon) Save ¶
func (l *ConfigFileHandlerCommon) Save() error
func (*ConfigFileHandlerCommon) SetData ¶
func (l *ConfigFileHandlerCommon) SetData(data interface{})
func (*ConfigFileHandlerCommon) SetFileName ¶
func (l *ConfigFileHandlerCommon) SetFileName(name string)
type PlatformInfo ¶
type PlatformInfo struct { Current types.Platform `yaml:"current"` Previous types.Platform `yaml:"previous"` }
func (*PlatformInfo) Load ¶
func (p *PlatformInfo) Load() error
type PrometheusInfo ¶
type StartupScripts ¶
func GetStartupScripts ¶
func GetStartupScripts(platform types.Platform) *StartupScripts
func (*StartupScripts) Create ¶
func (s *StartupScripts) Create() error
func (*StartupScripts) GetPath ¶
func (s *StartupScripts) GetPath() string
func (*StartupScripts) GetStartFileName ¶
func (s *StartupScripts) GetStartFileName() string
func (*StartupScripts) GetStopFileName ¶
func (s *StartupScripts) GetStopFileName() string
func (*StartupScripts) Remove ¶
func (s *StartupScripts) Remove()
Click to show internal directories.
Click to hide internal directories.