api

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EbpfNetThrottling

type EbpfNetThrottling struct {
	// TLast is the latest time an offline job's network packet is issued
	TLast uint64 `json:"latest_offline_packet_send_time"`
	// Rate is the maximum amount of network bandwidth that can be used by offline jobs
	Rate uint64 `json:"offline_bandwidth_limit"`
	// TXBytes is the total number of bytes of network packets of offline jobs
	TXBytes uint64 `json:"offline_tx_bytes"`
	// OnlineTXBytes is the total number of bytes of network packets of online jobs
	OnlineTXBytes uint64 `json:"online_tx_bytes"`
	// TStart is the last check time
	TStart uint64 `json:"latest_check_time"`
	EbpfNetThrottlingStatus
}

type EbpfNetThrottlingConfGetResult

type EbpfNetThrottlingConfGetResult struct {
	WaterLine string `json:"online_bandwidth_watermark"`
	Interval  uint64 `json:"interval"`
	LowRate   string `json:"offline_low_bandwidth"`
	HighRate  string `json:"offline_high_bandwidth"`
}

type EbpfNetThrottlingConfig

type EbpfNetThrottlingConfig struct {
	// WaterLine is the bandwidth threshold of online jobs, is the sum of bandwidth of all online pods
	// If the bandwidth usage of the online jobs exceeds this value,
	// the total network bandwidth usage of offline jobs will not exceed the value defined by LowRate.
	// Otherwise, the total bandwidth usage of offline jobs will not be allowed to exceed the value defined by HighRate.
	WaterLine uint64 `json:"online_bandwidth_watermark"`
	// Interval is the check period of statistical network bandwidth usage
	Interval uint64 `json:"interval"`
	// LowRate is the maximum amount of network bandwidth that can be used by offline jobs when the
	// bandwidth usage of online jobs exceeds the defined threshold(waterline)
	LowRate uint64 `json:"offline_low_bandwidth"`
	// HighRate is the maximum amount of network bandwidth that can be used by offline jobs when the
	// bandwidth usage of online jobs not reach to the defined threshold(waterline)
	HighRate uint64 `json:"offline_high_bandwidth"`
}

type EbpfNetThrottlingStatus

type EbpfNetThrottlingStatus struct {
	// CheckTimes is the total number of times the checking occurred
	CheckTimes uint64 `json:"check_times"`
	// HighTimes is the total number of checking times that the bandwidth usage of online jobs exceeds the threshold
	HighTimes uint64 `json:"high_times"`
	// LowTimes is the total number of checking times that the bandwidth usage of online jobs not reach to the threshold
	LowTimes uint64 `json:"low_times"`
	// OnlinePKTs is the total number of bytes in the network packet for online jobs
	OnlinePKTs uint64 `json:"online_tx_packages"`
	// OfflinePKTs is the total number of bytes in the network packet for offline jobs
	OfflinePKTs uint64 `json:"offline_tx_packages"`
	OfflinePrio uint64 `json:"offline_prio"`
	// RatePast is the network bandwidth of offline jobs in the latest check
	RatePast uint64 `json:"latest_online_bandwidth"`
	// OfflineRatePast is the network bandwidth of online jobs in the latest check
	OfflineRatePast uint64 `json:"latest_offline_bandwidth"`
}

type K8sArgs

type K8sArgs struct {
	types.CommonArgs

	// IP is pod's ip address
	IP net.IP

	// K8S_POD_NAME is pod's name
	K8S_POD_NAME types.UnmarshallableString

	// K8S_POD_NAMESPACE is pod's namespace
	K8S_POD_NAMESPACE types.UnmarshallableString

	// K8S_POD_INFRA_CONTAINER_ID is pod's container id
	K8S_POD_INFRA_CONTAINER_ID types.UnmarshallableString

	// internal
	// K8S_POD_UID is pod's UID
	K8S_POD_UID types.UnmarshallableString

	// K8S_POD_RUNTIME is pod's runtime type
	K8S_POD_RUNTIME types.UnmarshallableString

	// SECURE_CONTAINER is pod's runtime type
	// Deprecated: Use K8S_POD_RUNTIME instead
	SECURE_CONTAINER types.UnmarshallableString
}

K8sArgs is the valid CNI_ARGS used for Kubernetes

type NetConf

type NetConf struct {
	types.NetConf `json:",inline"`
	Args          map[string]string `json:"args,omitempty"`
}

NetConf for cni config file written in json

Jump to

Keyboard shortcuts

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