Major integrations and fixes: - Added BACKBEAT SDK integration for P2P operation timing - Implemented beat-aware status tracking for distributed operations - Added Docker secrets support for secure license management - Resolved KACHING license validation via HTTPS/TLS - Updated docker-compose configuration for clean stack deployment - Disabled rollback policies to prevent deployment failures - Added license credential storage (CHORUS-DEV-MULTI-001) Technical improvements: - BACKBEAT P2P operation tracking with phase management - Enhanced configuration system with file-based secrets - Improved error handling for license validation - Clean separation of KACHING and CHORUS deployment stacks 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
46 lines
1.1 KiB
Go
46 lines
1.1 KiB
Go
package cron
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// Option represents a modification to the default behavior of a Cron.
|
|
type Option func(*Cron)
|
|
|
|
// WithLocation overrides the timezone of the cron instance.
|
|
func WithLocation(loc *time.Location) Option {
|
|
return func(c *Cron) {
|
|
c.location = loc
|
|
}
|
|
}
|
|
|
|
// WithSeconds overrides the parser used for interpreting job schedules to
|
|
// include a seconds field as the first one.
|
|
func WithSeconds() Option {
|
|
return WithParser(NewParser(
|
|
Second | Minute | Hour | Dom | Month | Dow | Descriptor,
|
|
))
|
|
}
|
|
|
|
// WithParser overrides the parser used for interpreting job schedules.
|
|
func WithParser(p ScheduleParser) Option {
|
|
return func(c *Cron) {
|
|
c.parser = p
|
|
}
|
|
}
|
|
|
|
// WithChain specifies Job wrappers to apply to all jobs added to this cron.
|
|
// Refer to the Chain* functions in this package for provided wrappers.
|
|
func WithChain(wrappers ...JobWrapper) Option {
|
|
return func(c *Cron) {
|
|
c.chain = NewChain(wrappers...)
|
|
}
|
|
}
|
|
|
|
// WithLogger uses the provided logger.
|
|
func WithLogger(logger Logger) Option {
|
|
return func(c *Cron) {
|
|
c.logger = logger
|
|
}
|
|
}
|