Documentation
¶
Index ¶
- Variables
- func CollectAndShipSwarmLogs() error
- func CompareVersions(v1, v2 Version) int
- func ExtractVersionFromFolder(folder string) (string, error)
- func GetConfigServ() *service.Config
- func InstallService()
- func IsBackendMaintenanceError(err error) bool
- func IsEnterpriseImage(serviceName string) (bool, error)
- func IsInMaintenanceWindow() bool
- func MonitorConnection(server string, timeSleep time.Duration, maxAttempts int, hasConnection *bool)
- func RegisterInstance() error
- func RunService()
- func SaveVersion(vers, edition, changelog string) error
- func SortVersions(versions []map[string]string) []map[string]string
- func SyncSystemLogs()
- func UninstallService()
- func UpdateWindowConfig()
- type Auth
- type ConfigBackend
- type InstanceConfig
- type InstanceDTOInput
- type InstanceDTOOutput
- type InstanceInfo
- type LicenseEncrypted
- type MaintenanceWindow
- type SectionBackend
- type UpdateDTO
- type UpdaterClient
- func (c *UpdaterClient) CheckLicense() error
- func (c *UpdaterClient) CheckUpdate() error
- func (c *UpdaterClient) LicenseProcess()
- func (c *UpdaterClient) MarkUpdateSent(updateId string) error
- func (c *UpdaterClient) UpdateInstaller(version string) error
- func (c *UpdaterClient) UpdateProcess()
- func (c *UpdaterClient) UpdateToNewVersion(version, edition, changelog string) error
- func (c *UpdaterClient) UploadLogs(ctx context.Context, path string) error
- type Version
- type VersionDTO
- type VersionFile
Constants ¶
This section is empty.
Variables ¶
View Source
var (
SpecificVersion string // Version specified via command line flag
)
Functions ¶
func CollectAndShipSwarmLogs ¶
func CollectAndShipSwarmLogs() error
func CompareVersions ¶
func GetConfigServ ¶
func InstallService ¶
func InstallService()
func IsBackendMaintenanceError ¶
IsBackendMaintenanceError checks if the error is due to backend being unavailable (maintenance or down)
func IsEnterpriseImage ¶
func IsInMaintenanceWindow ¶
func IsInMaintenanceWindow() bool
func MonitorConnection ¶
func RegisterInstance ¶
func RegisterInstance() error
func RunService ¶
func RunService()
func SaveVersion ¶
func SyncSystemLogs ¶
func SyncSystemLogs()
func UninstallService ¶
func UninstallService()
func UpdateWindowConfig ¶
func UpdateWindowConfig()
Types ¶
type ConfigBackend ¶
type ConfigBackend struct {
ID int `json:"id"`
SectionID int `json:"sectionId"`
ConfParamShort string `json:"confParamShort"`
ConfParamLarge string `json:"confParamLarge"`
ConfParamDescription string `json:"confParamDescription"`
ConfParamValue string `json:"confParamValue"`
ConfParamRegexp string `json:"confParamRegexp"`
ConfParamRequired bool `json:"confParamRequired"`
ConfParamDatatype string `json:"confParamDatatype"`
ModificationTime string `json:"modificationTime"`
ModificationUser string `json:"modificationUser"`
ConfParamOption string `json:"confParamOption"`
Section SectionBackend `json:"section"`
}
type InstanceConfig ¶
type InstanceDTOInput ¶
type InstanceDTOOutput ¶
type InstanceDTOOutput struct {
ID string `json:"id"`
InstanceDTOInput
CreatedAt string `json:"created_at"`
}
type InstanceInfo ¶
type LicenseEncrypted ¶
type MaintenanceWindow ¶
type SectionBackend ¶
type UpdateDTO ¶
type UpdateDTO struct {
ID string `json:"id"`
Instance InstanceDTOInput `json:"instance,omitempty"`
Version VersionDTO `json:"version"`
Edition string `json:"edition"`
Sent bool `json:"sent"`
Approved bool `json:"approved"`
ApproveAt time.Time `json:"aprove_at,omitempty"`
}
type UpdaterClient ¶
type UpdaterClient struct {
Config InstanceConfig
License string
}
func GetUpdaterClient ¶
func GetUpdaterClient() *UpdaterClient
func (*UpdaterClient) CheckLicense ¶
func (c *UpdaterClient) CheckLicense() error
func (*UpdaterClient) CheckUpdate ¶
func (c *UpdaterClient) CheckUpdate() error
func (*UpdaterClient) LicenseProcess ¶
func (c *UpdaterClient) LicenseProcess()
func (*UpdaterClient) MarkUpdateSent ¶
func (c *UpdaterClient) MarkUpdateSent(updateId string) error
func (*UpdaterClient) UpdateInstaller ¶
func (c *UpdaterClient) UpdateInstaller(version string) error
func (*UpdaterClient) UpdateProcess ¶
func (c *UpdaterClient) UpdateProcess()
func (*UpdaterClient) UpdateToNewVersion ¶
func (c *UpdaterClient) UpdateToNewVersion(version, edition, changelog string) error
func (*UpdaterClient) UploadLogs ¶
func (c *UpdaterClient) UploadLogs(ctx context.Context, path string) error
type Version ¶
type Version struct {
Major int
Minor int
Patch int
PrereleaseName string // alpha, beta, rc, or empty
PrereleaseNum int // the number after alpha.X, beta.X, rc.X
Original string
}
Version sorting functions
func ParseVersion ¶
type VersionDTO ¶
type VersionFile ¶
type VersionFile struct {
Version string `json:"version"`
Changelog string `json:"changelog"`
Edition string `json:"edition"`
}
func GetVersion ¶
func GetVersion() (VersionFile, error)
Click to show internal directories.
Click to hide internal directories.