Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ctx ¶
type Ctx struct {
Request Request
Response *Response
Extras map[string]interface{}
// contains filtered or unexported fields
}
func NewCtx ¶
func NewCtx(msg *schedulespb.ServerMessage) *Ctx
func (*Ctx) ToClientMessage ¶
func (c *Ctx) ToClientMessage() *schedulespb.ClientMessage
type Schedule ¶
type Schedule interface {
// Run a function at a certain interval defined by the cronExpression.
// Valid function signatures for handler are:
//
// func()
// func() error
// func(*schedules.Ctx)
// func(*schedules.Ctx) error
// Handler[schedules.Ctx]
Cron(cron string, handler interface{})
// Run a function at a certain interval defined by the rate. The rate is e.g. '7 days'. All rates accept a number and a frequency. Valid frequencies are 'days', 'hours' or 'minutes'.
// Valid function signatures for handler are:
//
// func()
// func() error
// func(*schedules.Ctx)
// func(*schedules.Ctx) error
// Handler[schedules.Ctx]
Every(rate string, handler interface{})
}
func NewSchedule ¶
NewSchedule - Create a new Schedule resource
Click to show internal directories.
Click to hide internal directories.