orchestrator

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

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

type Orchestrator struct {
	OpLog *oplog.OpLog
	// contains filtered or unexported fields
}

Orchestrator is responsible for managing repos and backups.

func NewOrchestrator

func NewOrchestrator(resticBin string, cfg *v1.Config, oplog *oplog.OpLog, logStore *rotatinglog.RotatingLog) (*Orchestrator, error)

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) GetPlan

func (o *Orchestrator) GetPlan(planId string) (*v1.Plan, error)

func (*Orchestrator) GetRepo

func (o *Orchestrator) GetRepo(repoId string) (*v1.Repo, 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) 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

func (o *Orchestrator) ScheduleTask(t tasks.Task, priority int, callbacks ...func(error)) error

ScheduleTask schedules a task to run at the next available time. note that o.mu must not be held when calling this function.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL