until.go until单词的意思conj. 在…以前;直到…时 prep. 在…以前;到…为止。那这个函数到执行到什么时候为止呢?
原文代码量几十行,内容较少,先看原始注释
// ConditionFunc returns true if the condition has been reached, false if it has not been reached yet,
// or an error if the condition cannot be checked and should terminate. In general, it is better to define
// level driven conditions over edge driven conditions (pod has ready=true, vs pod modified and ready changed
// from false to true).
//条件:如果条件已达到,则返回true;如果尚未到达,则返回false;或错误,如果条件不能被检查,并且应该终止。
//一般来说,最好是定义水平驱动条件超过边缘驱动条件(pod状态 ready = true,对pod进行了修改,状态已经改变从false改为true)。
//有道翻译,看翻译越看越迷糊,还不如根据代码来看
type ConditionFunc func(event Event) (bool, error)
// errWatchClosed is returned when the watch channel is closed before timeout in Until.
// 当watch通道在超时之前关闭时,将返回errWatchClosed。
var errWatchClosed = errors.New("watch closed before Un
一步一步来理解until.go until单词的意思conj. 在…以前;直到…时 prep. 在…以前;到…为止。那这个函数到执行到什么时候为止呢?原文代码量几十行,内容较少,先看原始注释 // ConditionFunc returns true if the condition has been reached, false if it has not been reached y