monitor

package
v1.9.0-dev-20241229 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestDiskID1 = "fsid"

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

Variables

This section is empty.

Functions

func DeleteDisk added in v1.5.0

func DeleteDisk(diskType longhorn.DiskType, diskName, diskUUID, diskPath, diskDriver string, client *engineapi.DiskService) error

DeleteDisk deletes the disk with the given name, uuid, path and driver

func GetDiskNamesFromDiskMap

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

Types

type CollectedDiskInfo

type CollectedDiskInfo struct {
	Path                      string
	NodeOrDiskEvicted         bool
	DiskStat                  *lhtypes.DiskStat
	DiskName                  string
	DiskUUID                  string
	DiskDriver                longhorn.DiskDriver
	Condition                 *longhorn.Condition
	OrphanedReplicaDataStores map[string]string
	InstanceManagerName       string
}

func NewDiskInfo

func NewDiskInfo(diskName, diskUUID, diskPath string, diskDriver longhorn.DiskDriver, nodeOrDiskEvicted bool, stat *lhtypes.DiskStat,
	orphanedReplicaDataStores map[string]string, instanceManagerName string, errorReason, errorMessage string) *CollectedDiskInfo

type CollectedEnvironmentCheckInfo added in v1.8.0

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

type DiskMonitor added in v1.8.0

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

func NewDiskMonitor added in v1.4.0

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

func NewFakeDiskMonitor added in v1.8.0

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

func (*DiskMonitor) GetCollectedData added in v1.8.0

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

func (*DiskMonitor) RunOnce added in v1.8.0

func (m *DiskMonitor) RunOnce() error

func (*DiskMonitor) Start added in v1.8.0

func (m *DiskMonitor) Start()

func (*DiskMonitor) Stop added in v1.8.0

func (m *DiskMonitor) Stop()

func (*DiskMonitor) UpdateConfiguration added in v1.8.0

func (m *DiskMonitor) UpdateConfiguration(map[string]interface{}) error

type DiskServiceClient added in v1.6.0

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

type EnvironmentCheckMonitor added in v1.8.0

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

func NewEnvironmentCheckMonitor added in v1.8.0

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

func (*EnvironmentCheckMonitor) GetCollectedData added in v1.8.0

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

func (*EnvironmentCheckMonitor) RunOnce added in v1.8.0

func (m *EnvironmentCheckMonitor) RunOnce() error

func (*EnvironmentCheckMonitor) Start added in v1.8.0

func (m *EnvironmentCheckMonitor) Start()

func (*EnvironmentCheckMonitor) Stop added in v1.8.0

func (m *EnvironmentCheckMonitor) Stop()

func (*EnvironmentCheckMonitor) UpdateConfiguration added in v1.8.0

func (m *EnvironmentCheckMonitor) UpdateConfiguration(map[string]interface{}) error

type FakeEnvironmentCheckMonitor added in v1.8.0

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

func NewFakeEnvironmentCheckMonitor added in v1.8.0

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

func (*FakeEnvironmentCheckMonitor) GetCollectedData added in v1.8.0

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

func (*FakeEnvironmentCheckMonitor) RunOnce added in v1.8.0

func (m *FakeEnvironmentCheckMonitor) RunOnce() error

func (*FakeEnvironmentCheckMonitor) Start added in v1.8.0

func (m *FakeEnvironmentCheckMonitor) Start()

func (*FakeEnvironmentCheckMonitor) Stop added in v1.8.0

func (m *FakeEnvironmentCheckMonitor) Stop()

func (*FakeEnvironmentCheckMonitor) UpdateConfiguration added in v1.8.0

func (m *FakeEnvironmentCheckMonitor) UpdateConfiguration(map[string]interface{}) error

type GenerateDiskConfigHandler added in v1.5.0

type GenerateDiskConfigHandler func(longhorn.DiskType, string, string, string, string, *DiskServiceClient) (*util.DiskConfig, error)

type GetDiskConfigHandler added in v1.5.0

type GetReplicaDataStoresHandler added in v1.7.0

type GetReplicaDataStoresHandler func(longhorn.DiskType, *longhorn.Node, string, string, string, string, *DiskServiceClient) (map[string]string, error)

type Monitor

type Monitor interface {
	Start()
	Stop()
	UpdateConfiguration(map[string]interface{}) error
	GetCollectedData() (interface{}, error)
	RunOnce() error
}

type SnapshotChangeEvent added in v1.4.0

type SnapshotChangeEvent struct {
	VolumeName   string
	SnapshotName string
}

type SnapshotMonitor added in v1.4.0

type SnapshotMonitor struct {
	sync.RWMutex

	SnapshotMonitorStatus
	// contains filtered or unexported fields
}

func NewSnapshotMonitor added in v1.4.0

func NewSnapshotMonitor(logger logrus.FieldLogger, ds *datastore.DataStore, nodeName string, eventRecorder record.EventRecorder,
	snapshotChangeEventQueue workqueue.TypedInterface[any], syncCallback func(key string)) (*SnapshotMonitor, error)

func (*SnapshotMonitor) GetCollectedData added in v1.4.0

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

func (*SnapshotMonitor) RunOnce added in v1.4.0

func (m *SnapshotMonitor) RunOnce() error

func (*SnapshotMonitor) Start added in v1.4.0

func (m *SnapshotMonitor) Start()

func (*SnapshotMonitor) Stop added in v1.8.0

func (m *SnapshotMonitor) Stop()

func (*SnapshotMonitor) UpdateConfiguration added in v1.4.0

func (m *SnapshotMonitor) UpdateConfiguration(map[string]interface{}) error

type SnapshotMonitorStatus added in v1.4.0

type SnapshotMonitorStatus struct {
	LastSnapshotPeriodicCheckedAt metav1.Time
}

Jump to

Keyboard shortcuts

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