schedule

package
v0.0.0-...-e998f03 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Schedule

type Schedule struct {
	SpecReplicas           []SpecReplicas
	Name                   string
	Namespace              string
	TargetGroupVersionKind schema.GroupVersionKind
}

Schedule is a high-level way of schedule and scaling action

type ScheduleLoader

type ScheduleLoader interface {
	Load(typemeta *v1.TypeMeta, objmeta *v1.ObjectMeta) (*Schedule, error)
}

ScheduleLoader is the interface that wraps the Load method. Load loads the name of the target to operate on, the number to scale, and the time from the annotations included in the kubernetes manifest.

func NewDefaultScheduleLoader

func NewDefaultScheduleLoader(annotationParser annotations.Parser) ScheduleLoader

NewDefaultScheduleLoader return defaultScheduleLoader object with the given annotation parser.

type SpecReplicas

type SpecReplicas struct {
	Spec     string `json:"spec,omitempty"`
	Replicas uint   `json:"replicas,omitempty"`
}

func (*SpecReplicas) Validate

func (sr *SpecReplicas) Validate() error

Jump to

Keyboard shortcuts

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