configuration

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Copyright @ 2021 fushaosong <fushaosong@beyondlet.com>.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	SchedulerBinpack  = "binpack"
	SchedulerSpradout = "spradout"
)

配置文件路径

Variables

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

Functions

func DiskGroupPolicy

func DiskGroupPolicy() string

磁盘分组策略,目前只支持根据磁盘类型分组

func DiskScanInterval

func DiskScanInterval() int64

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

func DiskSelector

func DiskSelector() []string

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

func RegisterListenerChan

func RegisterListenerChan(c chan<- struct{})

func RuntimeNamespace

func RuntimeNamespace() string

func SchedulerStrategy

func SchedulerStrategy() string

pv调度策略binpac/spradout,默认为binpac

Types

type ConfigProvider

type ConfigProvider struct {
	NodeName string   `json:"nodeName"`
	Vg       []string `json:"vg"`
}

提供给其他应用获取服务数据 这个configMap理论上应该由Node Server更新,为了实现简单改为有Control Server更新,遍历所有Node信息更新configmap 暂定这些参数字段,不排除会增加一些需要暴露的数据

Jump to

Keyboard shortcuts

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