repair

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

R holds all the detections and repairs we want to perform. Each "plugin" calls register from an init function to be added to this map. No locking is needed, because this is only written to from init functions.

Functions

func Names

func Names() []string

Names() returns a string slice with all the names of the Repairers.

func Register

func Register(r Repairer, name string)

Register register Repair r with name in the repair list.

Types

type Always

type Always struct{}

func (*Always) Detect

func (a *Always) Detect(_ string) error

func (*Always) OfInterest

func (a *Always) OfInterest() []string

func (*Always) Repair

func (a *Always) Repair(_ string) error

type Ceph

type Ceph struct{}

func (*Ceph) Detect

func (c *Ceph) Detect(mount string) error

func (*Ceph) OfInterest

func (c *Ceph) OfInterest() []string

OfInterest returns the directories where a Ceph filesystem is mounted.

func (*Ceph) Repair

func (c *Ceph) Repair(mount string) error

type Noop

type Noop struct{}

func (*Noop) Detect

func (n *Noop) Detect(_ string) error

func (*Noop) OfInterest

func (n *Noop) OfInterest() []string

func (*Noop) Repair

func (n *Noop) Repair(_ string) error

type Repairer

type Repairer interface {
	// OfInterest returns a string slice with items that are of interest for this repair. Each string can be given
	// to Detect and Repair. They have no meaning to cnczd.
	OfInterest() []string
	// Detect detects that something is wrong by returning a non-nil error in the error slice.
	Detect(interest string) error
	// Repair tries to remedy what has been detecting by Detect. A returned error (in the error slice) means it
	// couldn't fix it.
	Repair(interest string) error
}

Jump to

Keyboard shortcuts

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