common

package
v1.6.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	AppHandler        = "/api/v1/namespaces/default/pods"
	NodeHandler       = "/api/v1/nodes"
	DeploymentHandler = "/apis/apps/v1/namespaces/default/deployments"
	ConfigmapHandler  = "/api/v1/namespaces/default/configmaps"
	ServiceHandler    = "/api/v1/namespaces/default/services"
	NodelabelKey      = "k8snode"
	NodelabelVal      = "kb-perf-node"
)

K8s resource handlers

Variables

View Source
var (
	Deployments         []string
	NodeInfo            = make(map[string][]string)
	CloudConfigMap      string
	CloudCoreDeployment string
	ToTaint             bool
	IsQuicProtocol      bool
)

Functions

func AddFakePod added in v1.0.0

func AddFakePod(ControllerHubURL string, pod types.FakePod)

AddFakePod adds a fake pod

func ApplyLabel

func ApplyLabel(nodeHandler string) error

func CreateConfigMapforEdgeCore added in v1.0.0

func CreateConfigMapforEdgeCore(cloudhub, cmHandler, nodeHandler string, numOfNodes int)

func DeleteCloudDeployment

func DeleteCloudDeployment(apiserver string)

func DeleteEdgeDeployments

func DeleteEdgeDeployments(apiServerForRegisterNode, apiServerForDeployments string, nodes int)

func DeleteFakePod added in v1.0.0

func DeleteFakePod(ControllerHubURL string, pod types.FakePod)

DeleteFakePod deletes a fake pod

func GetLatency added in v1.6.1

func GetLatency(pods []types.FakePod) types.Latency

GetLatency calculates latency based on different percent

func HandleCloudDeployment

func HandleCloudDeployment(cloudConfigMap, cloudCoreDeployment, apiserver2, confighdl, deploymenthdl, imgURL string, nodelimit int) error

func HandleEdgeCorePodDeployment added in v1.0.0

func HandleEdgeCorePodDeployment(depHandler, imgURL, podHandler, nodeHandler string, numOfNodes int) v1.PodList

func HandleEdgeDeployment

func HandleEdgeDeployment(cloudhub, depHandler, nodeHandler, cmHandler, imgURL, podHandler string, numOfNodes int) v1.PodList

func ListFakePods added in v1.0.0

func ListFakePods(ControllerHubURL string) []types.FakePod

ListFakePods lists all fake pods

func SendHTTPRequest added in v1.6.1

func SendHTTPRequest(method, reqAPI string, body io.Reader) (*http.Response, error)

SendHTTPRequest launches a http request

Types

This section is empty.

Jump to

Keyboard shortcuts

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