kubernetes/test/images/agnhost/resource-consumer-controller/controller.go

var CmdResourceConsumerController

var port

var consumerPort

var consumerServiceName

var consumerServiceNamespace

var dnsDomain

// getDNSDomain walks through DNS configuration and looks for "svc.foo" record
// where "foo" is currently configured DNS suffix. Then picks that 'foo' part up
// and returns to a caller.
func getDNSDomain() string {}

func init() {}

func main(cmd *cobra.Command, args []string) {}

type controller

func newController() *controller {}

func (c *controller) ServeHTTP(w http.ResponseWriter, req *http.Request) {}

func (c *controller) handleConsumeCPU(w http.ResponseWriter, query url.Values) {}

func (c *controller) handleConsumeMem(w http.ResponseWriter, query url.Values) {}

func (c *controller) handleBumpMetric(w http.ResponseWriter, query url.Values) {}

func (c *controller) sendConsumeCPURequests(w http.ResponseWriter, requests, millicores, durationSec int) {}

func (c *controller) sendConsumeMemRequests(w http.ResponseWriter, requests, megabytes, durationSec int) {}

func (c *controller) sendConsumeCustomMetric(w http.ResponseWriter, metric string, requests, delta, durationSec int) {}

func createConsumerURL(suffix string) string {}

// sendOneConsumeCPURequest sends POST request for cpu consumption
func (c *controller) sendOneConsumeCPURequest(w http.ResponseWriter, millicores int, durationSec int) {}

// sendOneConsumeMemRequest sends POST request for memory consumption
func (c *controller) sendOneConsumeMemRequest(w http.ResponseWriter, megabytes int, durationSec int) {}

// sendOneConsumeCustomMetric sends POST request for custom metric consumption
func (c *controller) sendOneConsumeCustomMetric(w http.ResponseWriter, customMetricName string, delta int, durationSec int) {}