utils

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Kbps = 1000
	Mbps = 1000 * 1000
	Gbps = 1000 * 1000 * 1000
	Tbps = 1000 * 1000 * 1000 * 1000

	Kibps = 1024
	Mibps = 1024 * 1024
	Gibps = 1024 * 1024 * 1024
	Tibps = 1024 * 1024 * 1024 * 1024
)
View Source
const (
	TCPROGPath         = "/usr/share/bwmcli/bwm_tc.o"
	CNILogFilePath     = "/var/log/volcano/agent/network-qos.log"
	ToolCmdLogFilePath = "/var/log/volcano/agent/network-qos-tools.log"
	NetWorkCmdFile     = "/usr/local/bin/network-qos"
	DefaultCNIConfFile = "/etc/cni/net.d/cni.conflist"
)
View Source
const (
	OnlineBandwidthWatermarkKey = "online-bandwidth-watermark"
	OfflineLowBandwidthKey      = "offline-low-bandwidth"
	OfflineHighBandwidthKey     = "offline-high-bandwidth"
	NetWorkQoSCheckInterval     = "check-interval"
	NodeColocationEnable        = "colocation"
	EnableNetworkQoS            = "enable-network-qos"
	CNIPluginName               = "network-qos"
)
View Source
const (
	OpenEulerOSReleaseName    = "openEuler"
	OpenEulerOSReleaseVersion = "22.03 (LTS-SP2)"

	// HostOSReleasePathEnv presents the key for env of host os release file
	HostOSReleasePathEnv = "HOST_OS_RELEASE"

	DefaultNodeOSReleasePath = "/host/etc/os-release"
	NetworkQoSPath           = "/opt/cni/bin/network-qos"
)
View Source
const (
	// CNIConfFilePathEnv presents the key for env of cni con file
	CNIConfFilePathEnv = "CNI_CONF_FILE_PATH"
)
View Source
const (
	DefaultInterval = "10000000" // 1000000 纳秒 = 10 毫秒
)

Variables

This section is empty.

Functions

func Error

func Error(errOut io.Writer, cmd *cobra.Command, err error)

func InitLog

func InitLog(logPath string) error

func SizeStrConvertToByteSize

func SizeStrConvertToByteSize(sizeStr string) (uint64, error)

Types

This section is empty.

Directories

Path Synopsis
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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