Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StorageObjectCountTracker ¶ added in v0.23.0
type StorageObjectCountTracker interface { // OnCount is invoked to update the current number of total // objects for the given resource OnCount(string, int64) // Get returns the total number of objects for the given resource. // If the given resource is not being tracked Get will return zero. // For now, we do not differentiate between zero object count and // a given resoure not being present. Get(string) int64 }
StorageObjectCountTracker is an interface that is used to keep track of of the total number of objects for each resource. {group}.{resource} is used as the key name to update and retrieve the total number of objects for a given resource.
func NewStorageObjectCountTracker ¶ added in v0.23.0
func NewStorageObjectCountTracker() StorageObjectCountTracker
NewStorageObjectCountTracker returns an instance of StorageObjectCountTracker interface that can be used to keep track of the total number of objects for each resource.
type Width ¶
type Width struct { // Seats represents the number of seats associated with this request Seats uint }
func DefaultWidthEstimator ¶
DefaultWidthEstimator returns returns '1' as the "width" of the given request.
TODO: when we plumb in actual "width" handling for different
type of request(s) this function will iterate through a chain of widthEstimator instance(s).
type WidthEstimatorFunc ¶
WidthEstimatorFunc returns the estimated "width" of a given request. This function will be used by the Priority & Fairness filter to estimate the "width" of incoming requests.
func (WidthEstimatorFunc) EstimateWidth ¶
func (e WidthEstimatorFunc) EstimateWidth(r *http.Request) Width