common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package common contains the utilities and the types common to the checkers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatStatus

func FormatStatus(moduleStatus ModuleStatus) string

FormatStatus returns a formatted string with the provided status.

func GetModuleAlerts

func GetModuleAlerts(module liqov1beta1.Module) []string

GetModuleAlerts returns the alerts for the given module.

Types

type ModuleStatus

type ModuleStatus string

ModuleStatus represents the status of each of the modules.

const (
	// ModuleHealthy indicates a module that works as expected.
	ModuleHealthy ModuleStatus = "Healthy"
	// ModuleUnhealthy indicates that there are issues with the module.
	ModuleUnhealthy ModuleStatus = "Unhealthy"
	// ModuleDisabled indicates that the modules is not currently used.
	ModuleDisabled ModuleStatus = "Disabled"
)

func CheckModuleStatus

func CheckModuleStatus(module liqov1beta1.Module) ModuleStatus

CheckModuleStatus based on the conditions of a module returns its status.

func CheckModuleStatusAndAlerts

func CheckModuleStatusAndAlerts(module liqov1beta1.Module) (status ModuleStatus, alerts []string)

CheckModuleStatusAndAlerts returns the status and the alerts of the given module.

Jump to

Keyboard shortcuts

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