Documentation ¶
Index ¶
- Variables
- type Orchestrator
- func (o *Orchestrator) ApplyConfig(cfg *v1.Config) error
- func (o *Orchestrator) CancelOperation(operationId int64, status v1.OperationStatus) error
- func (o *Orchestrator) Config() *v1.Config
- func (o *Orchestrator) CreateUnscheduledTask(t tasks.Task, priority int, curTime time.Time) (tasks.ScheduledTask, error)
- func (o *Orchestrator) GetPlan(planID string) (*v1.Plan, error)
- func (o *Orchestrator) GetRepo(repoID string) (*v1.Repo, error)
- func (o *Orchestrator) GetRepoOrchestrator(repoId string) (repo *repo.RepoOrchestrator, err error)
- func (o *Orchestrator) Run(ctx context.Context)
- func (o *Orchestrator) RunTask(ctx context.Context, st tasks.ScheduledTask) error
- func (o *Orchestrator) ScheduleDefaultTasks(config *v1.Config) error
- func (o *Orchestrator) ScheduleTask(t tasks.Task, priority int, callbacks ...func(error)) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPlanNotFound = errors.New("plan not found")
View Source
var ErrRepoInitializationFailed = errors.New("repo initialization failed")
View Source
var ErrRepoNotFound = errors.New("repo not found")
Functions ¶
This section is empty.
Types ¶
type Orchestrator ¶
Orchestrator is responsible for managing repos and backups.
func NewOrchestrator ¶
func (*Orchestrator) ApplyConfig ¶
func (o *Orchestrator) ApplyConfig(cfg *v1.Config) error
func (*Orchestrator) CancelOperation ¶
func (o *Orchestrator) CancelOperation(operationId int64, status v1.OperationStatus) error
func (*Orchestrator) Config ¶ added in v1.0.0
func (o *Orchestrator) Config() *v1.Config
func (*Orchestrator) CreateUnscheduledTask ¶ added in v1.6.0
func (o *Orchestrator) CreateUnscheduledTask(t tasks.Task, priority int, curTime time.Time) (tasks.ScheduledTask, error)
func (*Orchestrator) GetRepoOrchestrator ¶ added in v1.0.0
func (o *Orchestrator) GetRepoOrchestrator(repoId string) (repo *repo.RepoOrchestrator, err error)
func (*Orchestrator) Run ¶
func (o *Orchestrator) Run(ctx context.Context)
Run is the main orchestration loop. Cancel the context to stop the loop.
func (*Orchestrator) RunTask ¶ added in v1.3.0
func (o *Orchestrator) RunTask(ctx context.Context, st tasks.ScheduledTask) error
func (*Orchestrator) ScheduleDefaultTasks ¶ added in v0.16.0
func (o *Orchestrator) ScheduleDefaultTasks(config *v1.Config) error
rescheduleTasksIfNeeded checks if any tasks need to be rescheduled based on config changes.
func (*Orchestrator) ScheduleTask ¶
ScheduleTask schedules a task to run at the next available time. note that o.mu must not be held when calling this function.
Click to show internal directories.
Click to hide internal directories.