Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Expression ¶
type Expression interface {
// Next returns the closest time instant immediately following `fromTime` which
// matches the cron expression `expr`.
Next(fromTime time.Time) time.Time
}
Expression is implemented by cron expressions.
func NewExpressionFromCronSchedule ¶
func NewExpressionFromCronSchedule(spec *execution.CronSchedule, parser *Parser, hashID string) (Expression, error)
NewExpressionFromCronSchedule returns a new Expression after parsing all expressions from *execution.CronSchedule.
func NewMultiExpression ¶
func NewMultiExpression(expressions ...Expression) Expression
NewMultiExpression wraps multiple Expression into a single one.
type Parser ¶
type Parser struct {
// Specifies the CronFormat to use.
Format cronexpr.CronFormat
// If true, names will be hashed when passed to Parse.
HashNames bool
// Optionally specify the raw ParseOption to pass to the cronexpr parser
ParseOptions []cronexpr.ParseOption
}
Parser wraps the raw cronexpr parser to encapsulate common configuration.
func NewParserFromConfig ¶
func NewParserFromConfig(cfg *configv1alpha1.CronExecutionConfig) *Parser
Click to show internal directories.
Click to hide internal directories.