telemetryscheduler

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package telemetryscheduler logic contains specific code for TAS such as prioritize and filter methods.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricsExtender

type MetricsExtender struct {
	// contains filtered or unexported fields
}

MetricsExtender holds information on the cache holding scheduling strategies and metrics.

func NewMetricsExtender

func NewMetricsExtender(newCache cache.Reader) MetricsExtender

NewMetricsExtender returns a new metric Extender with the cache passed to it.

func (MetricsExtender) Bind

Bind binds the pod to the node. Not implemented by TAS, hence response with StatusNotFound.

func (MetricsExtender) DecodeExtenderRequest

func (m MetricsExtender) DecodeExtenderRequest(r *http.Request) (extender.Args, error)

DecodeExtenderRequest reads the json request into the expected struct. It returns an error of the request is not in the required format.

func (MetricsExtender) Filter

Filter manages all filter requests from the scheduler. It decodes the request, checks its policy and registers it. It then calls the filter logic and writes a response to the scheduler.

func (MetricsExtender) Prioritize

func (m MetricsExtender) Prioritize(w http.ResponseWriter, r *http.Request)

Prioritize manages all prioritize requests from the scheduler extender. It decodes the package, checks its policy, and performs error checking. It then calls the prioritize logic and writes a response to the scheduler.

func (MetricsExtender) WriteFilterResponse

func (m MetricsExtender) WriteFilterResponse(w http.ResponseWriter, result *extender.FilterResult)

WriteFilterResponse takes the ExtenderFilterResults struct and writes it as a http response if valid.

func (MetricsExtender) WritePrioritizeResponse

func (m MetricsExtender) WritePrioritizeResponse(w http.ResponseWriter, result *extender.HostPriorityList)

WritePrioritizeResponse writes out the results of prioritize in the response to the scheduler.

Jump to

Keyboard shortcuts

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