probe

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: Apache-2.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNeedRescan = errors.New("need rescan")
)
View Source
var RegisteredProbes = []func(){
	seachestProbeRegister,
	smartProbeRegister,
	mountProbeRegister,
	udevProbeRegister,
	sysfsProbeRegister,
	usedbyProbeRegister,
	customTagProbeRegister,
	blkidProbeRegister,
}

RegisteredProbes contains register function of probes which we want to register

Functions

func Rescan added in v0.8.0

func Rescan(c *controller.Controller) error

Rescan syncs etcd and NDM

func Start

func Start(registeredProbes []func())

Start starts registration of probes present in RegisteredProbes

Types

type EventAction

type EventAction string

EventAction action type for disk events like attach or detach events

const (
	// AttachEA is attach disk event name
	AttachEA EventAction = libudevwrapper.UDEV_ACTION_ADD
	// DetachEA is detach disk event name
	DetachEA EventAction = libudevwrapper.UDEV_ACTION_REMOVE
	// ChangeEA event is generated whenever some property of the blockdevice
	// changes in udev
	ChangeEA EventAction = libudevwrapper.UDEV_ACTION_CHANGE
)

type ProbeEvent

type ProbeEvent struct {
	Controller *controller.Controller
}

ProbeEvent struct contain a copy of controller it will update disk resources

Jump to

Keyboard shortcuts

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