Documentation ¶
Index ¶
- func FindNodeStatusCondition(conditions []corev1.NodeCondition, conditionType corev1.NodeConditionType) *corev1.NodeCondition
- func MetaV1Condition2NodeCondition(cond metav1.Condition) corev1.NodeCondition
- func NodeCondition2MetaV1Condition(cond *corev1.NodeCondition) *metav1.Condition
- func SetNodeStatusCondition(conditions *[]corev1.NodeCondition, newCondition corev1.NodeCondition)
- type ConditionCache
- type ConditionStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindNodeStatusCondition ¶
func FindNodeStatusCondition(conditions []corev1.NodeCondition, conditionType corev1.NodeConditionType) *corev1.NodeCondition
FindNodeStatusCondition returns the condition with the specific type.
func MetaV1Condition2NodeCondition ¶
func MetaV1Condition2NodeCondition(cond metav1.Condition) corev1.NodeCondition
MetaV1Condition2NodeCondition converts metav1.Condition to corev1.NodeCondition.
func NodeCondition2MetaV1Condition ¶
func NodeCondition2MetaV1Condition(cond *corev1.NodeCondition) *metav1.Condition
NodeCondition2MetaV1Condition converts corev1.NodeCondition to metav1.Condition.
func SetNodeStatusCondition ¶
func SetNodeStatusCondition(conditions *[]corev1.NodeCondition, newCondition corev1.NodeCondition)
SetNodeStatusCondition set the condition into node conditions.
Types ¶
type ConditionCache ¶
type ConditionCache struct {
// contains filtered or unexported fields
}
ConditionCache caches observed conditions until threshold.
func NewConditionCache ¶
func NewConditionCache(successThreshold, failureThreshold time.Duration) ConditionCache
NewConditionCache returns a cache for condition.
func (*ConditionCache) ThresholdAdjustedCondition ¶
func (c *ConditionCache) ThresholdAdjustedCondition(key string, curr, observed *metav1.Condition) *metav1.Condition
ThresholdAdjustedCondition adjusts conditions according to the threshold.
type ConditionStore ¶
type ConditionStore interface { Load(key string) (*metav1.Condition, error) Store(key string, cond *metav1.Condition) error ListAll() ([]metav1.Condition, error) }
ConditionStore provides an interface to load or store conditions.
func NewNodeConditionStore ¶
func NewNodeConditionStore(client typedcorev1.NodeInterface, lister listcorev1.NodeLister, conditionType string, staleThreshold time.Duration) ConditionStore
NewNodeConditionStore returns a store for node conditions.
Click to show internal directories.
Click to hide internal directories.