Documentation
¶
Index ¶
- type Application
- func (app *Application) Call(callback func()) schedule.Event
- func (app *Application) Command(command string) schedule.Event
- func (app *Application) Events() []schedule.Event
- func (app *Application) Register(events []schedule.Event)
- func (app *Application) Run()
- func (app *Application) Shutdown(ctx ...context.Context) error
- type Event
- func (r *Event) At(time string) schedule.Event
- func (r *Event) Cron(expression string) schedule.Event
- func (r *Event) Daily() schedule.Event
- func (r *Event) DailyAt(time string) schedule.Event
- func (r *Event) Days(days ...time.Weekday) schedule.Event
- func (r *Event) DelayIfStillRunning() schedule.Event
- func (r *Event) EveryFifteenMinutes() schedule.Event
- func (r *Event) EveryFifteenSeconds() schedule.Event
- func (r *Event) EveryFiveMinutes() schedule.Event
- func (r *Event) EveryFiveSeconds() schedule.Event
- func (r *Event) EveryFourHours() schedule.Event
- func (r *Event) EveryFourMinutes() schedule.Event
- func (r *Event) EveryMinute() schedule.Event
- func (r *Event) EverySecond() schedule.Event
- func (r *Event) EverySixHours() schedule.Event
- func (r *Event) EveryTenMinutes() schedule.Event
- func (r *Event) EveryTenSeconds() schedule.Event
- func (r *Event) EveryThirtyMinutes() schedule.Event
- func (r *Event) EveryThirtySeconds() schedule.Event
- func (r *Event) EveryThreeHours() schedule.Event
- func (r *Event) EveryThreeMinutes() schedule.Event
- func (r *Event) EveryTwentySeconds() schedule.Event
- func (r *Event) EveryTwoHours() schedule.Event
- func (r *Event) EveryTwoMinutes() schedule.Event
- func (r *Event) EveryTwoSeconds() schedule.Event
- func (r *Event) Fridays() schedule.Event
- func (r *Event) GetCallback() func()
- func (r *Event) GetCommand() string
- func (r *Event) GetCron() string
- func (r *Event) GetDelayIfStillRunning() bool
- func (r *Event) GetName() string
- func (r *Event) GetSkipIfStillRunning() bool
- func (r *Event) Hourly() schedule.Event
- func (r *Event) HourlyAt(offset []string) schedule.Event
- func (r *Event) IsOnOneServer() bool
- func (r *Event) Mondays() schedule.Event
- func (r *Event) Monthly() schedule.Event
- func (r *Event) Name(name string) schedule.Event
- func (r *Event) OnOneServer() schedule.Event
- func (r *Event) Quarterly() schedule.Event
- func (r *Event) Saturdays() schedule.Event
- func (r *Event) SkipIfStillRunning() schedule.Event
- func (r *Event) Sundays() schedule.Event
- func (r *Event) Thursdays() schedule.Event
- func (r *Event) Tuesdays() schedule.Event
- func (r *Event) TwiceDaily(hours ...int) schedule.Event
- func (r *Event) Wednesdays() schedule.Event
- func (r *Event) Weekdays() schedule.Event
- func (r *Event) Weekends() schedule.Event
- func (r *Event) Weekly() schedule.Event
- func (r *Event) Yearly() schedule.Event
- type Logger
- type ScheduleRunner
- type ServiceProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func NewApplication ¶
func (*Application) Call ¶
func (app *Application) Call(callback func()) schedule.Event
func (*Application) Events ¶
func (app *Application) Events() []schedule.Event
func (*Application) Register ¶
func (app *Application) Register(events []schedule.Event)
func (*Application) Run ¶
func (app *Application) Run()
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
func NewCallbackEvent ¶
func NewCallbackEvent(callback func()) *Event
func NewCommandEvent ¶
func (*Event) DailyAt ¶
DailyAt schedule the event to run daily at a given time (10:00, 19:30, etc).
func (*Event) DelayIfStillRunning ¶
DelayIfStillRunning do not allow the event to overlap each other.
func (*Event) EveryFifteenMinutes ¶
EveryFifteenMinutes schedule the event to run every fifteen minutes.
func (*Event) EveryFifteenSeconds ¶
EveryFifteenSeconds schedule the event to run every fifteen seconds.
func (*Event) EveryFiveMinutes ¶
EveryFiveMinutes schedule the event to run every five minutes.
func (*Event) EveryFiveSeconds ¶
EveryFiveSeconds schedule the event to run every five seconds.
func (*Event) EveryFourHours ¶
EveryFourHours schedule the event to run every four hours.
func (*Event) EveryFourMinutes ¶
EveryFourMinutes schedule the event to run every four minutes.
func (*Event) EveryMinute ¶
EveryMinute schedule the event to run every minute.
func (*Event) EverySecond ¶
EverySecond schedule the event to run every second.
func (*Event) EverySixHours ¶
EverySixHours schedule the event to run every six hours.
func (*Event) EveryTenMinutes ¶
EveryTenMinutes schedule the event to run every ten minutes.
func (*Event) EveryTenSeconds ¶
EveryTenSeconds schedule the event to run every ten seconds.
func (*Event) EveryThirtyMinutes ¶
EveryThirtyMinutes schedule the event to run every thirty minutes.
func (*Event) EveryThirtySeconds ¶
EveryThirtySeconds schedule the event to run every thirty seconds.
func (*Event) EveryThreeHours ¶
EveryThreeHours schedule the event to run every three hours.
func (*Event) EveryThreeMinutes ¶
EveryThreeMinutes schedule the event to run every three minutes.
func (*Event) EveryTwentySeconds ¶
EveryTwentySeconds schedule the event to run every twenty seconds.
func (*Event) EveryTwoHours ¶
EveryTwoHours schedule the event to run every two hours.
func (*Event) EveryTwoMinutes ¶
EveryTwoMinutes schedule the event to run every two minutes.
func (*Event) EveryTwoSeconds ¶
EveryTwoSeconds schedule the event to run every two seconds.
func (*Event) GetCallback ¶
func (r *Event) GetCallback() func()
func (*Event) GetCommand ¶
func (*Event) GetDelayIfStillRunning ¶
func (*Event) GetSkipIfStillRunning ¶
func (*Event) IsOnOneServer ¶
func (*Event) OnOneServer ¶
func (*Event) SkipIfStillRunning ¶
SkipIfStillRunning do not allow the event to overlap each other.
func (*Event) TwiceDaily ¶
TwiceDaily schedule the event to run twice a day,default at 1:00 and 13:00.
func (*Event) Wednesdays ¶
Wednesdays schedule the event to run on Wednesdays.
type ScheduleRunner ¶
type ScheduleRunner struct {
// contains filtered or unexported fields
}
func NewScheduleRunner ¶
func NewScheduleRunner(config config.Config, schedule schedule.Schedule) *ScheduleRunner
func (*ScheduleRunner) Run ¶
func (r *ScheduleRunner) Run() error
func (*ScheduleRunner) ShouldRun ¶
func (r *ScheduleRunner) ShouldRun() bool
func (*ScheduleRunner) Shutdown ¶
func (r *ScheduleRunner) Shutdown() error
func (*ScheduleRunner) Signature ¶
func (r *ScheduleRunner) Signature() string
type ServiceProvider ¶
type ServiceProvider struct {
}
func (*ServiceProvider) Boot ¶
func (r *ServiceProvider) Boot(app foundation.Application)
func (*ServiceProvider) Register ¶
func (r *ServiceProvider) Register(app foundation.Application)
func (*ServiceProvider) Relationship ¶
func (r *ServiceProvider) Relationship() binding.Relationship
func (*ServiceProvider) Runners ¶
func (r *ServiceProvider) Runners(app foundation.Application) []foundation.Runner