monitor

package
v1.3.2-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestDiskID1 = "fsid"

	TestOrphanedReplicaDirectoryName = "test-volume-r-000000000"
)
View Source
const (
	NodeMonitorSyncPeriod = 30 * time.Second
)

Variables

This section is empty.

Functions

func GetDiskNamesFromDiskMap

func GetDiskNamesFromDiskMap(diskInfoMap map[string]*CollectedDiskInfo) []string

Types

type CollectedDiskInfo

type CollectedDiskInfo struct {
	Path                          string
	NodeOrDiskEvicted             bool
	DiskStat                      *util.DiskStat
	DiskUUID                      string
	Condition                     *longhorn.Condition
	OrphanedReplicaDirectoryNames map[string]string
}

func NewDiskInfo

func NewDiskInfo(path, diskUUID string, nodeOrDiskEvicted bool, stat *util.DiskStat, orphanedReplicaDirectoryNames map[string]string, errorReason, errorMessage string) *CollectedDiskInfo

type GenerateDiskConfig

type GenerateDiskConfig func(string) (*util.DiskConfig, error)

type GetDiskConfig

type GetDiskConfig func(string) (*util.DiskConfig, error)

type GetDiskStatHandler

type GetDiskStatHandler func(string) (*util.DiskStat, error)

type GetPossibleReplicaDirectoryNames

type GetPossibleReplicaDirectoryNames func(*longhorn.Node, string, string, string) map[string]string

type Monitor

type Monitor interface {
	Start()
	Close()

	SyncCollectedData() error
	GetCollectedData() (interface{}, error)
}

type NodeMonitor

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

func NewFakeNodeMonitor

func NewFakeNodeMonitor(logger logrus.FieldLogger, ds *datastore.DataStore, nodeName string, syncCallback func(key string)) (*NodeMonitor, error)

func NewNodeMonitor

func NewNodeMonitor(logger logrus.FieldLogger, ds *datastore.DataStore, nodeName string, syncCallback func(key string)) (*NodeMonitor, error)

func (*NodeMonitor) Close

func (m *NodeMonitor) Close()

func (*NodeMonitor) GetCollectedData

func (m *NodeMonitor) GetCollectedData() (interface{}, error)

func (*NodeMonitor) Start

func (m *NodeMonitor) Start()

func (*NodeMonitor) SyncCollectedData

func (m *NodeMonitor) SyncCollectedData() error

Jump to

Keyboard shortcuts

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