Documentation ¶
Index ¶
- Constants
- func GetCurrentTime() time.Time
- func GetRetain(policyName string, policyType stork_api.SchedulePolicyType) (stork_api.Retain, error)
- func Init() error
- func TriggerRequired(policyName string, policyType stork_api.SchedulePolicyType, ...) (bool, error)
- func ValidateSchedulePolicy(policy *stork_api.SchedulePolicy) error
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 ¶
GetCurrentTime returns the current time as per the scheduler
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 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.
Click to show internal directories.
Click to hide internal directories.