scout

package
v0.0.0-...-b2e0f1d Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ABillion              float64 = 1_000_000_000
	EmojiFingerPointRight         = "👉"
	FlashingLightEmoji            = "🚨"
	SuccessEmoji                  = "✅"
	WarningSign                   = "⚠️ " // why does this need an extra space to align?!?!
	HEALTHY                       = "HEALTHY"
	WARNING                       = "WARNING"
	DANGER                        = "DANGER"
)

Variables

This section is empty.

Functions

func Contains

func Contains(slice []string, value string) bool

contains checks if a string slice contains a given value.

func GetPercentage

func GetPercentage(x, y float64) float64

getPercentage calculates the percentage of x in relation to y.

Types

type Advice

type Advice struct {
	Kind string
	Msg  string
}

type Config

type Config struct {
	Namespace     string
	Pod           string
	Output        string
	Warnings      bool
	RestConfig    *rest.Config
	K8sClient     *kubernetes.Clientset
	MetricsClient *metricsv.Clientset
}

type ContainerMetrics

type ContainerMetrics struct {
	PodName string
	Limits  map[string]Resources
}

type Resources

type Resources struct {
	Cpu     *resource.Quantity
	Memory  *resource.Quantity
	Storage *resource.Quantity
}

type UsageStats

type UsageStats struct {
	ContainerName string
	CpuCores      *resource.Quantity
	Memory        *resource.Quantity
	Storage       *resource.Quantity
	CpuUsage      float64
	MemoryUsage   float64
	StorageUsage  float64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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