common

package
v0.0.0-...-2d43aa0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: Apache-2.0 Imports: 14 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

func AddFakePod(ControllerHubURL string, pod types.FakePod)

AddFakePod adds a fake pod

func ApplyLabel

func ApplyLabel(nodeHandler string) error

func CreateConfigMapforEdgeCore

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

func DeleteFakePod(ControllerHubURL string, pod types.FakePod)

DeleteFakePod deletes a fake pod

func HandleCloudDeployment

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

func HandleEdgeCorePodDeployment

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

func ListFakePods(ControllerHubURL string) []types.FakePod

ListFakePods lists all fake pods

func SendHttpRequest

func SendHttpRequest(method, reqApi string, body io.Reader) (error, *http.Response)

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