// SortedByGroupAndVersion sorts APIServices into their different groups, and then sorts them based on their versions. // For example, the first element of the first array contains the APIService with the highest version number, in the // group with the highest priority; while the last element of the last array contains the APIService with the lowest // version number, in the group with the lowest priority. func SortedByGroupAndVersion(servers []*v1.APIService) [][]*v1.APIService { … } type ByGroupPriorityMinimum … func (s ByGroupPriorityMinimum) Len() int { … } func (s ByGroupPriorityMinimum) Swap(i, j int) { … } func (s ByGroupPriorityMinimum) Less(i, j int) bool { … } type ByVersionPriority … func (s ByVersionPriority) Len() int { … } func (s ByVersionPriority) Swap(i, j int) { … } func (s ByVersionPriority) Less(i, j int) bool { … } // APIServiceNameToGroupVersion returns the GroupVersion for a given apiServiceName. The name // must be valid, but any object you get back from an informer will be valid. func APIServiceNameToGroupVersion(apiServiceName string) schema.GroupVersion { … } // NewLocalAvailableAPIServiceCondition returns a condition for an available local APIService. func NewLocalAvailableAPIServiceCondition() v1.APIServiceCondition { … } // SetAPIServiceCondition sets the status condition. It either overwrites the existing one or // creates a new one func SetAPIServiceCondition(apiService *v1.APIService, newCondition v1.APIServiceCondition) { … } // IsAPIServiceConditionTrue indicates if the condition is present and strictly true func IsAPIServiceConditionTrue(apiService *v1.APIService, conditionType v1.APIServiceConditionType) bool { … } // GetAPIServiceConditionByType gets an *APIServiceCondition by APIServiceConditionType if present func GetAPIServiceConditionByType(apiService *v1.APIService, conditionType v1.APIServiceConditionType) *v1.APIServiceCondition { … }