Documentation ¶
Overview ¶
Package scheduler provides default implementation for basic scheduler tasks.
Index ¶
- Variables
- type FakeAction
- func (f *FakeAction) CanPause() bool
- func (f *FakeAction) CanStop() bool
- func (f *FakeAction) GetDescription(lang ...string) actions.ActionDescription
- func (f *FakeAction) GetName() string
- func (f *FakeAction) GetParametersForm() *forms.Form
- func (f *FakeAction) Init(job *jobs.Job, action *jobs.Action) error
- func (f *FakeAction) ProvidesProgress() bool
- func (f *FakeAction) Run(ctx context.Context, channels *actions.RunnableChannels, ...) (*jobs.ActionMessage, error)
- type FakeUsersAction
- func (f *FakeUsersAction) CanPause() bool
- func (f *FakeUsersAction) CanStop() bool
- func (f *FakeUsersAction) GetDescription(lang ...string) actions.ActionDescription
- func (f *FakeUsersAction) GetName() string
- func (f *FakeUsersAction) GetParametersForm() *forms.Form
- func (f *FakeUsersAction) Init(job *jobs.Job, action *jobs.Action) error
- func (f *FakeUsersAction) ProvidesProgress() bool
- func (f *FakeUsersAction) Run(ctx context.Context, channels *actions.RunnableChannels, ...) (*jobs.ActionMessage, error)
- type PruneJobsAction
- func (c *PruneJobsAction) GetDescription(lang ...string) actions.ActionDescription
- func (c *PruneJobsAction) GetName() string
- func (c *PruneJobsAction) GetParametersForm() *forms.Form
- func (c *PruneJobsAction) Init(job *jobs.Job, action *jobs.Action) error
- func (c *PruneJobsAction) Run(ctx context.Context, channels *actions.RunnableChannels, ...) (*jobs.ActionMessage, error)
Constants ¶
This section is empty.
Variables ¶
var (
ErrTaskInterrupted = fmt.Errorf("interrupted")
)
Functions ¶
This section is empty.
Types ¶
type FakeAction ¶
type FakeAction struct { common.RuntimeHolder // contains filtered or unexported fields }
func (*FakeAction) CanPause ¶
func (f *FakeAction) CanPause() bool
CanPause implements ControllableAction
func (*FakeAction) CanStop ¶
func (f *FakeAction) CanStop() bool
CanStop implements ControllableAction
func (*FakeAction) GetDescription ¶
func (f *FakeAction) GetDescription(lang ...string) actions.ActionDescription
GetDescription returns action description
func (*FakeAction) GetName ¶
func (f *FakeAction) GetName() string
GetName returns this action unique identifier
func (*FakeAction) GetParametersForm ¶
func (f *FakeAction) GetParametersForm() *forms.Form
GetParametersForm returns a UX form
func (*FakeAction) ProvidesProgress ¶
func (f *FakeAction) ProvidesProgress() bool
ProvidesProgress mocks ProgressProviderAction interface method
func (*FakeAction) Run ¶
func (f *FakeAction) Run(ctx context.Context, channels *actions.RunnableChannels, input *jobs.ActionMessage) (*jobs.ActionMessage, error)
Run performs the actual action code
type FakeUsersAction ¶
type FakeUsersAction struct { common.RuntimeHolder // contains filtered or unexported fields }
func (*FakeUsersAction) CanPause ¶
func (f *FakeUsersAction) CanPause() bool
CanPause implements ControllableAction
func (*FakeUsersAction) CanStop ¶
func (f *FakeUsersAction) CanStop() bool
CanStop implements ControllableAction
func (*FakeUsersAction) GetDescription ¶
func (f *FakeUsersAction) GetDescription(lang ...string) actions.ActionDescription
GetDescription returns action description
func (*FakeUsersAction) GetName ¶
func (f *FakeUsersAction) GetName() string
GetName returns this action unique identifier
func (*FakeUsersAction) GetParametersForm ¶
func (f *FakeUsersAction) GetParametersForm() *forms.Form
GetParametersForm returns a UX form
func (*FakeUsersAction) ProvidesProgress ¶
func (f *FakeUsersAction) ProvidesProgress() bool
ProvidesProgress mocks ProgressProviderAction interface method
func (*FakeUsersAction) Run ¶
func (f *FakeUsersAction) Run(ctx context.Context, channels *actions.RunnableChannels, input *jobs.ActionMessage) (*jobs.ActionMessage, error)
Run the actual action code
type PruneJobsAction ¶
type PruneJobsAction struct { common.RuntimeHolder // contains filtered or unexported fields }
func (*PruneJobsAction) GetDescription ¶
func (c *PruneJobsAction) GetDescription(lang ...string) actions.ActionDescription
GetDescription returns action description
func (*PruneJobsAction) GetName ¶
func (c *PruneJobsAction) GetName() string
GetName returns this action unique identifier
func (*PruneJobsAction) GetParametersForm ¶
func (c *PruneJobsAction) GetParametersForm() *forms.Form
GetParametersForm returns a UX form
func (*PruneJobsAction) Run ¶
func (c *PruneJobsAction) Run(ctx context.Context, channels *actions.RunnableChannels, input *jobs.ActionMessage) (*jobs.ActionMessage, error)
Run the actual action code