config

package
v0.0.0-...-cbc0f95 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BaseConf = base_config.Config{}
View Source
var MainConf = Config{
	Resource: ResourceConfig{
		Api: base_config.AppConfig{
			Name:                        "ResourceApi",
			NodeServiceDownTimeDuration: 60,
		},
		Controller: ResourceControllerConfig{
			AppConfig: base_config.AppConfig{
				Name: "ReosurceController",
			},
			SyncRegionServiceTimeout: 10,
		},
	},
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Resource ResourceConfig
}

type ResourceClusterAgentConfig

type ResourceClusterAgentConfig struct {
	base_config.AppConfig
	Compute       ResourceComputeConfig
	ReportProject string
	LogMap        map[string]ResourceLogConfig
	Metrics       ResourceMetricsConfig
}

type ResourceClusterApiConfig

type ResourceClusterApiConfig struct {
	base_config.AppConfig
	RegionName string
}

type ResourceClusterConfig

type ResourceClusterConfig struct {
	Region             string
	Datacenter         string
	Kind               string
	Weight             int
	DomainSuffix       string
	TimeSeriesDatabase TimeSeriesDatabaseConfig
	Api                base_config.AppConfig
	Controller         base_config.AppConfig
	Agent              ResourceClusterAgentConfig
}

type ResourceComputeConfig

type ResourceComputeConfig struct {
	Enable               bool
	ConfirmRetryCount    int
	ConfirmRetryInterval int

	// ConfigDir is directory for Compute config
	ConfigDir string

	// VarDir is directory for Compute data
	VarDir string
	// VmsDir is directory for VM data
	// Default is $VarDir/vms
	VmsDir string
	// Default is $VarDir/images
	ImagesDir string

	// VmNetnsGateway is Gateway in netns on host
	VmNetnsGatewayStartIp string
	VmNetnsGatewayEndIp   string

	// VmNetnsServiceIp is ServiceIp for VM in netns on host
	// NetnsService serve convenient services for VM
	VmNetnsServiceIp string

	// VmNetnsIp is assigned vm, this ip is available in netns on host
	// VmNetnsIp range is defined VmNetnsStartIp, and VmNetnsEndIp
	VmNetnsStartIp string
	VmNetnsEndIp   string

	// Driver is provider for VM.
	// Available providers are mock, qemu
	Driver string
}

ResourceComputeConfig is config for compute

type ResourceComputeExConfig

type ResourceComputeExConfig struct {
	ResourceComputeConfig
	ConfirmRetryInterval  time.Duration
	VmNetnsGatewayStartIp net.IP
	VmNetnsGatewayEndIp   net.IP
	VmNetnsServiceIp      net.IP
	VmNetnsStartIp        net.IP
	VmNetnsEndIp          net.IP
	VmsDir                string
	ImagesDir             string
	UserdataTmpl          string
	VmServiceTmpl         string
	VmServiceShTmpl       string
	SystemdDir            string
}

ResourceComputeExConfig is config for ComputeDriver This is auto generated from ResourceComputeConfig

type ResourceConfig

type ResourceConfig struct {
	Api         base_config.AppConfig
	Controller  ResourceControllerConfig
	ClusterName string
	ClusterMap  map[string]ResourceClusterConfig
}

type ResourceControllerConfig

type ResourceControllerConfig struct {
	base_config.AppConfig
	SyncRegionServiceTimeout int
}

type ResourceLogCheckConfig

type ResourceLogCheckConfig struct {
	Key             string
	Pattern         string
	Level           string
	ReissueDuration int
}

type ResourceLogConfig

type ResourceLogConfig struct {
	Path               string
	LogFormat          string
	MaxInitialReadSize int64
	CheckPrefix        string
	CheckMap           map[string]ResourceLogCheckConfig
}

type ResourceMetricsConfig

type ResourceMetricsConfig struct {
	System ResourceMetricsSystemConfig
}

type ResourceMetricsSystemCheckIoDelayConfig

type ResourceMetricsSystemCheckIoDelayConfig struct {
	Occurences        int
	ReissueDuration   int
	CritReadMsPerSec  int64
	WarnReadMsPerSec  int64
	CritWriteMsPerSec int64
	WarnWriteMsPerSec int64
	CritProgressIos   int64
	WarnProgressIos   int64
}

type ResourceMetricsSystemCpuCheckProcsBlockedConfig

type ResourceMetricsSystemCpuCheckProcsBlockedConfig struct {
	WarnRateLimit   float64
	CritRateLimit   float64
	Occurences      int
	ReissueDuration int
}

type ResourceMetricsSystemCpuCheckProcsRunningConfig

type ResourceMetricsSystemCpuCheckProcsRunningConfig struct {
	WarnRateLimit   float64
	CritRateLimit   float64
	Occurences      int
	ReissueDuration int
}

type ResourceMetricsSystemCpuConfig

type ResourceMetricsSystemCpuConfig struct {
	Enable            bool
	CheckProcsRunning ResourceMetricsSystemCpuCheckProcsRunningConfig
	CheckProcsBlocked ResourceMetricsSystemCpuCheckProcsBlockedConfig
}

type ResourceMetricsSystemDiskConfig

type ResourceMetricsSystemDiskConfig struct {
	Enable       bool
	CheckIoDelay ResourceMetricsSystemCheckIoDelayConfig
}

type ResourceMetricsSystemDiskFsCheckFreeConfig

type ResourceMetricsSystemDiskFsCheckFreeConfig struct {
	WarnFreeRatio   float64
	CritFreeRatio   float64
	Occurences      int
	ReissueDuration int
}

type ResourceMetricsSystemDiskFsConfig

type ResourceMetricsSystemDiskFsConfig struct {
	Enable    bool
	CheckFree ResourceMetricsSystemDiskFsCheckFreeConfig
}

type ResourceMetricsSystemLoginCheckLoginConfig

type ResourceMetricsSystemLoginCheckLoginConfig struct {
	Occurences      int
	ReissueDuration int
	WarnLoginSec    int64
	CritLoginSec    int64
}

type ResourceMetricsSystemLoginConfig

type ResourceMetricsSystemLoginConfig struct {
	Enable     bool
	CheckLogin ResourceMetricsSystemLoginCheckLoginConfig
}

type ResourceMetricsSystemMemBuddyinfoCheckPagesConfig

type ResourceMetricsSystemMemBuddyinfoCheckPagesConfig struct {
	WarnMinPages    int64
	Occurences      int
	ReissueDuration int
}

type ResourceMetricsSystemMemBuddyinfoConfig

type ResourceMetricsSystemMemBuddyinfoConfig struct {
	Enable     bool
	CheckPages ResourceMetricsSystemMemBuddyinfoCheckPagesConfig
}

type ResourceMetricsSystemMemCheckAvailableConfig

type ResourceMetricsSystemMemCheckAvailableConfig struct {
	WarnAvailableRatio float64
	Occurences         int
	ReissueDuration    int
}

type ResourceMetricsSystemMemCheckPgscanConfig

type ResourceMetricsSystemMemCheckPgscanConfig struct {
	WarnPgscanDirect int64
	Occurences       int
	ReissueDuration  int
}

type ResourceMetricsSystemMemConfig

type ResourceMetricsSystemMemConfig struct {
	Enable         bool
	CheckAvailable ResourceMetricsSystemMemCheckAvailableConfig
	CheckPgscan    ResourceMetricsSystemMemCheckPgscanConfig
}

type ResourceMetricsSystemNetCheckTcpErrorsConfig

type ResourceMetricsSystemNetCheckTcpErrorsConfig struct {
	Occurences             int
	ReissueDuration        int
	WarnOnPressures        bool
	CritOnPressures        bool
	WarnOnTcpAbortOnMemory bool
	CritOnTcpAbortOnMemory bool
	WarnOnListenDrops      bool
	CritOnListenDrops      bool
	WarnOnListenOverflows  bool
	CritOnListenOverflows  bool
}

type ResourceMetricsSystemNetConfig

type ResourceMetricsSystemNetConfig struct {
	Enable         bool
	CheckTcpErrors ResourceMetricsSystemNetCheckTcpErrorsConfig
}

type ResourceMetricsSystemNetDevCheckBytesConfig

type ResourceMetricsSystemNetDevCheckBytesConfig struct {
	Occurences      int
	ReissueDuration int
	WarnRatio       float64
	CritRatio       float64
}

type ResourceMetricsSystemNetDevCheckErrorsConfig

type ResourceMetricsSystemNetDevCheckErrorsConfig struct {
	Occurences      int
	ReissueDuration int
	WarnErrors      int64
	CritErrors      int64
	WarnDrops       int64
	CritDrops       int64
}

type ResourceMetricsSystemNetDevConfig

type ResourceMetricsSystemNetDevConfig struct {
	Enable       bool
	StatFilters  []string
	CheckFilters []string
	CheckBytes   ResourceMetricsSystemNetDevCheckBytesConfig
	CheckErrors  ResourceMetricsSystemNetDevCheckErrorsConfig
}

type ResourceMetricsSystemProcCheckProcConfig

type ResourceMetricsSystemProcCheckProcConfig struct {
	Occurences        int
	ReissueDuration   int
	Cmd               string
	Name              string
	WarnSchedWaitTime int64
	CritSchedWaitTime int64
}

type ResourceMetricsSystemProcCheckProcsStatusConfig

type ResourceMetricsSystemProcCheckProcsStatusConfig struct {
	Occurences      int
	ReissueDuration int
}

type ResourceMetricsSystemProcConfig

type ResourceMetricsSystemProcConfig struct {
	Enable           bool
	CheckProcsStatus ResourceMetricsSystemProcCheckProcsStatusConfig
	CheckProcMap     map[string]ResourceMetricsSystemProcCheckProcConfig
}

type ResourceMetricsSystemUptimeCheckBootConfig

type ResourceMetricsSystemUptimeCheckBootConfig struct {
	Occurences      int
	ReissueDuration int
	ReadinessSec    int64
}

type ResourceMetricsSystemUptimeConfig

type ResourceMetricsSystemUptimeConfig struct {
	Enable    bool
	CheckBoot ResourceMetricsSystemUptimeCheckBootConfig
}

type ResourceProcCheckConfig

type ResourceProcCheckConfig struct {
	Cmd  string
	Name string
}

type TimeSeriesDatabaseConfig

type TimeSeriesDatabaseConfig struct {
	Driver          string
	EventDatabases  []string
	LogDatabases    []string
	MetricDatabases []string
}

Jump to

Keyboard shortcuts

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