Documentation
¶
Index ¶
- func Chunks[T any](in []T, size int) [][]T
- func FindPodStatusCondition(conditions []corev1.PodCondition, conditionType corev1.PodConditionType) *corev1.PodCondition
- func GetNewConditions(conditions []v1.Condition, newCond v1.Condition) []v1.Condition
- func LatticeServiceName(k8sSourceRouteName string, k8sSourceRouteNamespace string) string
- func PodHasReadinessGate(pod *corev1.Pod, conditionType corev1.PodConditionType) bool
- func RandomAlphaString(length int) string
- func SetPodStatusCondition(conditions *[]corev1.PodCondition, newCondition corev1.PodCondition)
- func SliceFilter[T any](in []T, f FilterFunc[T]) []T
- func SliceMap[T any, U any](in []T, f MapFunc[T, U]) []U
- func SliceMapToPtr[T any](in []T) []*T
- func TargetRefToLatticeResourceName(targetRef *gwv1alpha2.NamespacedPolicyTargetReference, parentNamespace string) (string, error)
- func Truncate(name string, length int) string
- type FilterFunc
- type Item
- type MapFunc
- type PriorityQueue
- type Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindPodStatusCondition ¶ added in v1.0.4
func FindPodStatusCondition(conditions []corev1.PodCondition, conditionType corev1.PodConditionType) *corev1.PodCondition
Copied from: k8s.io/apimachinery/pkg/apis/meta
func GetNewConditions ¶ added in v0.0.16
func LatticeServiceName ¶ added in v0.0.17
func PodHasReadinessGate ¶ added in v1.0.4
func PodHasReadinessGate(pod *corev1.Pod, conditionType corev1.PodConditionType) bool
func RandomAlphaString ¶ added in v1.0.3
func SetPodStatusCondition ¶ added in v1.0.4
func SetPodStatusCondition(conditions *[]corev1.PodCondition, newCondition corev1.PodCondition)
Copied from: k8s.io/apimachinery/pkg/apis/meta
func SliceFilter ¶ added in v0.0.17
func SliceFilter[T any](in []T, f FilterFunc[T]) []T
func SliceMapToPtr ¶ added in v1.0.2
func SliceMapToPtr[T any](in []T) []*T
func TargetRefToLatticeResourceName ¶ added in v0.0.18
func TargetRefToLatticeResourceName( targetRef *gwv1alpha2.NamespacedPolicyTargetReference, parentNamespace string, ) (string, error)
Types ¶
type FilterFunc ¶ added in v0.0.17
type Item ¶ added in v1.1.1
type Item struct { Value any Priority int32 // The priority of the item in the queue. // The Index is needed by update and is maintained by the heap.Interface methods. Index int // The Index of the item in the heap. }
An Item is something we manage in a priority queue.
type PriorityQueue ¶ added in v1.1.1
type PriorityQueue []*Item
A PriorityQueue implements heap.Interface and holds Items.
func (PriorityQueue) Len ¶ added in v1.1.1
func (pq PriorityQueue) Len() int
func (PriorityQueue) Less ¶ added in v1.1.1
func (pq PriorityQueue) Less(i, j int) bool
func (*PriorityQueue) Peek ¶ added in v1.1.1
func (pq *PriorityQueue) Peek() (*Item, error)
Peek returns the highest priority item without removing it from the queue. Returns nil and an error if the queue is empty.
func (*PriorityQueue) Pop ¶ added in v1.1.1
func (pq *PriorityQueue) Pop() any
func (*PriorityQueue) Push ¶ added in v1.1.1
func (pq *PriorityQueue) Push(x any)
func (PriorityQueue) Swap ¶ added in v1.1.1
func (pq PriorityQueue) Swap(i, j int)
type Set ¶ added in v1.0.2
type Set[T comparable] struct { // contains filtered or unexported fields }
func NewSet ¶ added in v1.0.2
func NewSet[T comparable](objs ...T) Set[T]
Click to show internal directories.
Click to hide internal directories.