check

package
v0.0.0-...-56cfc23 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context)

Init configures our hooks for a logger

func SupportedResources

func SupportedResources() []v1.ResourceName

Types

type ScalingTarget

type ScalingTarget struct {
	Name      string
	Namespace string
	Kind      string
}

func (*ScalingTarget) Key

func (s *ScalingTarget) Key() string

Key generates a unique string for comparing between Spec targets

type Spec

type Spec struct {
	CPUPerReplica    float64 // In millicores
	MemoryPerReplica float64 // In bytes
	Name             string  // A defined name for this scaling configuration
	// ResourcePerReplica string        // How much resource per replica of the deployment
	Target ScalingTarget // What deployment to scale

}

func FromFile

func FromFile(jsonFile string) ([]Spec, error)

Support checks from CM :done: Support checks from JSON :done:

func FromReader

func FromReader(r io.Reader) ([]Spec, error)

func (*Spec) ResourceScaler

func (s *Spec) ResourceScaler(rName v1.ResourceName) float64

func (*Spec) TargetKey

func (s *Spec) TargetKey() string

Jump to

Keyboard shortcuts

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