maintenance

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildMaintenanceJSON added in v0.0.2

func BuildMaintenanceJSON(mReq maintenanceModeRequest) (config.Value, error)

BuildMaintenanceJSON results in this json format: {"title": "some title", "text": "some text"}

Types

type ClassicMaintenanceModeProvider added in v0.0.2

type ClassicMaintenanceModeProvider struct {
	// contains filtered or unexported fields
}

func NewClassicProvider added in v0.0.2

func NewClassicProvider() *ClassicMaintenanceModeProvider

func (ClassicMaintenanceModeProvider) GetMaintenanceMode added in v0.0.2

GetMaintenanceMode Get maintenance mode by checking if key maintenance exists in etcd

func (ClassicMaintenanceModeProvider) SetMaintenanceMode added in v0.0.2

func (m ClassicMaintenanceModeProvider) SetMaintenanceMode(mReq maintenanceModeRequest, ctx context.Context) (*MaintenanceModeStatus, error)

SetMaintenanceMode activates or deactivates the maintenance mode by adding/removing the key maintenance to the global-config

type Controller added in v0.0.2

type Controller struct {
	// contains filtered or unexported fields
}

func NewController added in v0.0.2

func NewController(provider Provider) *Controller

func (*Controller) GetMaintenanceMode added in v0.0.2

func (m *Controller) GetMaintenanceMode(w http.ResponseWriter, r *http.Request)

GetMaintenanceMode checks if the maintenance mode is currently active

func (*Controller) SetMaintenanceMode added in v0.0.2

func (m *Controller) SetMaintenanceMode(w http.ResponseWriter, r *http.Request)

SetMaintenanceMode activates or deactivates the maintenance mode bases on the given activate parameter

type MaintenanceModeStatus added in v0.0.2

type MaintenanceModeStatus struct {
	IsActive bool `json:"isActive"`
}

type Message added in v0.0.2

type Message struct {
	Title string `json:"title"`
	Text  string `json:"text"`
}

type MultinodeMaintenanceModeProvider added in v0.0.2

type MultinodeMaintenanceModeProvider struct {
	// contains filtered or unexported fields
}

func NewMultinodeProvider added in v0.0.2

func NewMultinodeProvider(repo globalConfigRepo) *MultinodeMaintenanceModeProvider

func (MultinodeMaintenanceModeProvider) GetMaintenanceMode added in v0.0.2

GetMaintenanceMode Get maintenance mode by checking if key maintenance exists in global-config

func (MultinodeMaintenanceModeProvider) SetMaintenanceMode added in v0.0.2

func (m MultinodeMaintenanceModeProvider) SetMaintenanceMode(mReq maintenanceModeRequest, ctx context.Context) (*MaintenanceModeStatus, error)

SetMaintenanceMode activates or deactivates the maintenance mode by adding/removing the key maintenance to the global-config

type Provider added in v0.0.2

type Provider interface {
	SetMaintenanceMode(mReq maintenanceModeRequest, ctx context.Context) (*MaintenanceModeStatus, error)
	GetMaintenanceMode(ctx context.Context) (*MaintenanceModeStatus, error)
}

Jump to

Keyboard shortcuts

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