configuration

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchedulerBinpack   = "binpack"
	Schedulerspreadout = "spreadout"
)

配置文件路径

Variables

View Source
var GlobalConfig *viper.Viper
View Source
var TestAssistDiskSelector []string

Functions

func DiskScanInterval

func DiskScanInterval() int64

DiskScanInterval 定时磁盘扫描时间间隔(秒),默认300s

func GetRawDeviceGroupRe added in v0.10.0

func GetRawDeviceGroupRe(diskType string) []string

func RegisterListenerChan

func RegisterListenerChan(c chan<- struct{})

func RuntimeNamespace

func RuntimeNamespace() string

func SchedulerStrategy

func SchedulerStrategy() string

SchedulerStrategy pv调度策略binpack/spreadout,默认为binpack

Types

type Disk added in v0.9.1

type Disk struct {
	DiskSelectors     []DiskSelectorItem `json:"diskSelectors"`
	DiskScanInterval  int64              `json:"diskScanInterval"`
	SchedulerStrategy string             `json:"schedulerStrategy"`
}

type DiskSelectorItem added in v0.9.1

type DiskSelectorItem struct {
	Name      string   `json:"name"`
	Re        []string `json:"re"`
	Policy    string   `json:"policy"`
	NodeLabel string   `json:"nodeLabel"`
}

func DiskSelector

func DiskSelector() []DiskSelectorItem

DiskSelector 支持正则表达式 定时扫描本地磁盘,凡是匹配的将被加入到相应vg卷组 对于此配置的修改需要非常慎重,如果更改匹配条件,可能会移除正在使用的磁盘

Jump to

Keyboard shortcuts

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