Documentation ¶
Overview ¶
Package telemetryscheduler logic contains specific code for TAS such as prioritize and filter methods.
Index ¶
- type MetricsExtender
- func (m MetricsExtender) Bind(w http.ResponseWriter, _ *http.Request)
- func (m MetricsExtender) DecodeExtenderRequest(r *http.Request) (extender.Args, error)
- func (m MetricsExtender) Filter(w http.ResponseWriter, r *http.Request)
- func (m MetricsExtender) Prioritize(w http.ResponseWriter, r *http.Request)
- func (m MetricsExtender) WriteFilterResponse(w http.ResponseWriter, result *extender.FilterResult)
- func (m MetricsExtender) WritePrioritizeResponse(w http.ResponseWriter, result *extender.HostPriorityList)
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 ¶
func (m MetricsExtender) Bind(w http.ResponseWriter, _ *http.Request)
Bind binds the pod to the node. Not implemented by TAS, hence response with StatusNotFound.
func (MetricsExtender) DecodeExtenderRequest ¶
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 ¶
func (m MetricsExtender) Filter(w http.ResponseWriter, r *http.Request)
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.