snaprd

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Diff

type Diff struct {
	SyncRequired bool
	Equal        float64
	Added        float64
	Removed      float64
	Updated      float64
	Moved        float64
	Copied       float64
	Restored     float64
}

Diff is a data struct from the diff log

type Snaprd

type Snaprd struct {
	Config   *config.Config
	LogFiles []string
}

Snaprd contains the configuration for snaprd

func New

func New(configFile string) (*Snaprd, error)

New creates a new instance of Snaprd

func (*Snaprd) ExecCmd

func (s *Snaprd) ExecCmd(command string, args ...string) (*os.File, error)

ExecCmd runs a snapraid command and returns the logfile location and an error

func (*Snaprd) ParseDiff

func (s *Snaprd) ParseDiff(f *os.File) (*Diff, error)

ParseDiff parses the Diff cmd logfile output

func (*Snaprd) ParseTouch

func (s *Snaprd) ParseTouch(f *os.File) (float64, error)

ParseTouch parses the Touch cmd logfile output

func (*Snaprd) Run

func (s *Snaprd) Run()

Run starts the cron schedule

Jump to

Keyboard shortcuts

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