monitor

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsError

func IsError(err error) bool

func IsSuccess

func IsSuccess(err error) bool

func IsWarning

func IsWarning(err error) bool

Types

type InternalWarningError added in v0.28.1

type InternalWarningError struct {
}

func (InternalWarningError) Error added in v0.28.1

func (w InternalWarningError) Error() string

type OutputAnalysis

type OutputAnalysis interface {
	// ContainsRemoteLockFailure returns true if the output indicates that remote locking failed.
	ContainsRemoteLockFailure() bool

	// GetRemoteLockedSince returns the time duration since the remote lock was created.
	// If no remote lock is held or the time cannot be determined, the second parameter is false.
	GetRemoteLockedSince() (time.Duration, bool)

	// GetRemoteLockedMaxWait returns the max time duration that restic waited for the lock to acquire.
	// If no remote lock is held or the time cannot be determined, the second parameter is false.
	GetRemoteLockedMaxWait() (time.Duration, bool)

	// GetRemoteLockedBy returns who locked the remote lock, if available.
	GetRemoteLockedBy() (string, bool)
}

OutputAnalysis of the profile run

type Receiver

type Receiver interface {
	// Start of a command
	Start(command string)
	// Status during the execution
	Status(status Status)
	// Summary at the end of a command
	Summary(command string, summary Summary, stderr string, result error)
}

type Status

type Status struct {
	PercentDone  float64
	TotalFiles   int
	FilesDone    int
	TotalBytes   int64
	BytesDone    int64
	ErrorCount   int
	CurrentFiles []string
}

type Summary

type Summary struct {
	Duration         time.Duration
	FilesNew         int
	FilesChanged     int
	FilesUnmodified  int
	DirsNew          int
	DirsChanged      int
	DirsUnmodified   int
	FilesTotal       int
	BytesAdded       uint64
	BytesAddedPacked uint64
	BytesTotal       uint64
	OutputAnalysis   OutputAnalysis
}

Summary of the profile run

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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