configuration

package
v0.0.0-...-59521d1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

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

配置文件路径

Variables

View Source
var GlobalConfig *viper.Viper

Functions

func CheckRawDeviceGroup

func CheckRawDeviceGroup(diskType string) bool

func GetDeviceGroup

func GetDeviceGroup(diskType string) string

GetDeviceGroup 处理磁盘类型参数,支持carina.storage.io/disk-group-name:ssd书写方式

func SchedulerStrategy

func SchedulerStrategy() string

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

Types

type Disk

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

type DiskClass

type DiskClass struct {
	DiskClassByName map[string]DiskSelectorItem `json:"diskClassByName"`
}

type DiskSelectorItem

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

Jump to

Keyboard shortcuts

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