scheduler

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scheduler

type Scheduler struct {
	// contains filtered or unexported fields
}

Scheduler syncs config from the API and manages cron-scheduled backups.

func New

func New(client *api.Client, resticBinary, agentID string, cfg *config.AgentConfig, syncInterval time.Duration) *Scheduler

New creates a scheduler.

func (*Scheduler) GetProgress added in v0.12.1

func (s *Scheduler) GetProgress() *localapi.BackupProgress

GetProgress returns the live progress of the current backup, or nil if idle.

func (*Scheduler) GetRepos added in v0.12.1

func (s *Scheduler) GetRepos() []localapi.RepoStatus

GetRepos returns the status of all configured repos for the local API.

func (*Scheduler) GetStatus added in v0.12.1

func (s *Scheduler) GetStatus() localapi.AgentStatus

GetStatus returns the current agent status for the local API.

func (*Scheduler) HandleCommand added in v0.5.0

func (s *Scheduler) HandleCommand(cmd ws.Command)

HandleCommand processes a command received from the WebSocket server. Commands are dispatched from the server (dashboard/API) to the agent in real time.

func (*Scheduler) SetVersionInfo added in v0.12.1

func (s *Scheduler) SetVersionInfo(agentVersion, resticVersion string)

SetVersionInfo sets the agent and restic version strings, exposed via the local API.

func (*Scheduler) SetWSClient added in v0.5.0

func (s *Scheduler) SetWSClient(wsClient *ws.Client)

SetWSClient sets the WebSocket client used for real-time progress streaming.

func (*Scheduler) Start

func (s *Scheduler) Start(ctx context.Context)

Start begins the scheduler loop.

func (*Scheduler) TriggerBackup added in v0.12.1

func (s *Scheduler) TriggerBackup(repoID string) error

TriggerBackup starts an ad-hoc backup for the given repo ID via the local API.

Jump to

Keyboard shortcuts

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