schedule

package
v2.6.3+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (

	// MockTimeConfigMapName is the name of the config map used to mock times
	MockTimeConfigMapName = "stork-mock-time"
	// MockTimeConfigMapNamespace is the namespace of the config map used to mock times
	MockTimeConfigMapNamespace = "kube-system"
	// MockTimeConfigMapKey is the key name in the config map data that contains the time
	MockTimeConfigMapKey = "time"
)

Variables

This section is empty.

Functions

func GetCurrentTime

func GetCurrentTime() time.Time

GetCurrentTime returns the current time as per the scheduler

func GetOptions

func GetOptions(policyName string, policyType stork_api.SchedulePolicyType) (map[string]string, error)

GetOptions Returns the options set for a policy type

func GetRetain

func GetRetain(policyName string, policyType stork_api.SchedulePolicyType) (stork_api.Retain, error)

GetRetain Returns the retain value for the specified policy. Returns the default for the policy if none is specified

func Init

func Init() error

Init initializes the schedule module

func TriggerRequired

func TriggerRequired(
	policyName string,
	policyType stork_api.SchedulePolicyType,
	lastTrigger meta.Time,
) (bool, error)

TriggerRequired Check if a trigger is required for a policy given the last trigger time

func ValidateSchedulePolicy

func ValidateSchedulePolicy(policy *stork_api.SchedulePolicy) error

ValidateSchedulePolicy Validate if a given schedule policy is valid

Types

This section is empty.

Jump to

Keyboard shortcuts

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