tasks

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CriticalProcessIndicatorName = "critical_process_running"
)
View Source
const MaintenanceRegistryKey = "maintenance"

MaintenanceRegistryKey contains the registry key name which points to the Maintenance Mode text.

Variables

This section is empty.

Functions

func ActivateMaintenanceMode

func ActivateMaintenanceMode(messageText string, registry registry.Registry) error

ActivateMaintenanceMode activates the maintenance mode in the registry. The given message text will be presented to the user. The message text must not be empty.

func ActivateMaintenanceModeWithTitle

func ActivateMaintenanceModeWithTitle(messageText string, title string, registry registry.Registry) error

ActivateMaintenanceModeWithTitle activates the maintenance mode in the registry. The given message text will be presented to the user. The message text must not be empty. The given title will be presented to the user. The title must not be empty.

func CreateProxySettings

func CreateProxySettings(reg registry.Registry) (core.ProxySettings, error)

CreateProxySettings reads the proxy related settings from registry.

func DeactivateMaintenanceMode

func DeactivateMaintenanceMode(registry registry.Registry) error

DeactivateMaintenanceMode deactivates the maintenance mode in the registry if it exists. This function will not return an error if the key is not present in the registry.

Types

type CriticalSystemState

type CriticalSystemState struct {
	SystemProcess string
	// contains filtered or unexported fields
}

CriticalSystemState is a state which indicates that the ces is blocked for user interaction.

func NewCriticalSystemState

func NewCriticalSystemState(reg registry.Registry, processName string) *CriticalSystemState

NewCriticalSystemState creates a new critical state object.

func (*CriticalSystemState) GetErrors

func (css *CriticalSystemState) GetErrors() []error

GetErrors returns a slice with any error that was sent to the errors channel.

func (*CriticalSystemState) Pause

func (css *CriticalSystemState) Pause() error

Pause sends the "wait" signal to the refresh routine.

func (*CriticalSystemState) Start

func (css *CriticalSystemState) Start(ctx context.Context) error

Start sets the critical process key for this process and starts the refresh routine.

func (*CriticalSystemState) Stop

func (css *CriticalSystemState) Stop() error

Stop removes the critical process key of this process from the registry and stops the refresh routine.

func (*CriticalSystemState) Unpause

func (css *CriticalSystemState) Unpause() error

Unpause sends the "start" signal to the refresh routine.

Jump to

Keyboard shortcuts

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