Documentation
¶
Index ¶
- func Bool(b bool) string
- func Duration(d time.Duration) string
- func Int(i int) string
- func Int64(i int64) string
- func NextScheduleForJobConfig(jobConfig *execution.JobConfig, cronParser *cron.Parser, format TimeFormatFunc, ...) (string, error)
- func Time(t *metav1.Time, opts ...Option) string
- func TimeAgo(t *metav1.Time, opts ...Option) string
- func TimeWithTimeAgo(t *metav1.Time, opts ...Option) string
- type Config
- type Option
- type TimeFormatFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NextScheduleForJobConfig ¶
func NextScheduleForJobConfig( jobConfig *execution.JobConfig, cronParser *cron.Parser, format TimeFormatFunc, opts ...Option, ) (string, error)
NextScheduleForJobConfig formats a JobConfig's next schedule with the given cron parser.
Types ¶
type Config ¶
type Config struct {
// DefaultValue is used in case of a zero value.
DefaultValue string
}
Config represents formatting configuration values.
type Option ¶
type Option func(c *Config)
Option represents functional options for various format functions.
func WithDefaultValue ¶
WithDefaultValue specifies a default value for the formatter.
Click to show internal directories.
Click to hide internal directories.