Documentation
¶
Index ¶
- Variables
- type Cursor
- type JobManager
- func (m *JobManager) Cancel(ctx context.Context, path, body string) error
- func (m *JobManager) Disable(ctx context.Context, path, body string) (*table.Job, error)
- func (m *JobManager) Enable(ctx context.Context, path, body string) (*table.Job, error)
- func (m *JobManager) Get(ctx context.Context, path, body string) (*table.Job, error)
- func (m *JobManager) List(ctx context.Context, path, sortBy string, reverse bool, limit int64) (jobs []table.Job, cursor string, err error)
- func (m *JobManager) ListContinue(ctx context.Context, cursor string) (jobs []table.Job, nextCursor string, err error)
- func (m *JobManager) Running() int
- func (m *JobManager) Schedule(ctx context.Context, path, body string, opt ScheduleOptions) (*table.Job, error)
- type ScheduleOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidArgs = errors.New("invalid arguments")
Functions ¶
This section is empty.
Types ¶
type JobManager ¶
type JobManager struct {
// contains filtered or unexported fields
}
func (*JobManager) Cancel ¶
func (m *JobManager) Cancel(ctx context.Context, path, body string) error
Cancel deletes the job with path and body.
func (*JobManager) Disable ¶
Disable prevents a job from from running until re-enabled. Disabling an I/P job does not cancel its current run.
func (*JobManager) ListContinue ¶
func (*JobManager) Running ¶
func (m *JobManager) Running() int
Running returns the number of running jobs currently.
func (*JobManager) Schedule ¶
func (m *JobManager) Schedule(ctx context.Context, path, body string, opt ScheduleOptions) (*table.Job, error)
Schedule inserts a new job to the table or replaces existing one. Returns the created or replaced job.
Click to show internal directories.
Click to hide internal directories.