Documentation ¶
Index ¶
- Constants
- func DeleteDisk(diskType longhorn.DiskType, diskName, diskUUID, diskPath, diskDriver string, ...) error
- func GetDiskNamesFromDiskMap(diskInfoMap map[string]*CollectedDiskInfo) []string
- type CollectedDiskInfo
- type DiskServiceClient
- type GenerateDiskConfigHandler
- type GetDiskConfigHandler
- type GetDiskStatHandler
- type GetReplicaDataStoresHandler
- type Monitor
- type NodeMonitor
- type SnapshotChangeEvent
- type SnapshotMonitor
- type SnapshotMonitorStatus
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 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 ¶
type DiskServiceClient ¶ added in v1.6.0
type DiskServiceClient struct {
// contains filtered or unexported fields
}
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 GetDiskConfigHandler func(longhorn.DiskType, string, string, longhorn.DiskDriver, *DiskServiceClient) (*util.DiskConfig, error)
type GetDiskStatHandler ¶
type GetDiskStatHandler func(longhorn.DiskType, string, string, longhorn.DiskDriver, *DiskServiceClient) (*lhtypes.DiskStat, error)
type GetReplicaDataStoresHandler ¶ added in v1.7.0
type NodeMonitor ¶
type NodeMonitor 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)) (*NodeMonitor, error)
func NewFakeNodeMonitor ¶
func NewFakeNodeMonitor(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) RunOnce ¶ added in v1.4.0
func (m *NodeMonitor) RunOnce() error
func (*NodeMonitor) Start ¶
func (m *NodeMonitor) Start()
func (*NodeMonitor) UpdateConfiguration ¶ added in v1.4.0
func (m *NodeMonitor) UpdateConfiguration(map[string]interface{}) error
type SnapshotChangeEvent ¶ added in v1.4.0
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) Close ¶ added in v1.4.0
func (m *SnapshotMonitor) Close()
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) UpdateConfiguration ¶ added in v1.4.0
func (m *SnapshotMonitor) UpdateConfiguration(map[string]interface{}) error
type SnapshotMonitorStatus ¶ added in v1.4.0
Click to show internal directories.
Click to hide internal directories.