= nil { utilruntime.HandleError(fmt.Errorf("%s: unable to add watch event object (%#v) to store: %v", r.name, event.Object, err)) } case watch.Modified: err := r.store.Update(event.Object) if err != nil { utilruntime.HandleError(fmt.Errorf("%s: unable to update watch eve...
funcNewReflector(lw ListerWatcher,expectedTypeinterface{},store Store,resyncPeriod time.Duration)*Reflector{// 默认的反射器名称为 file:linereturnNewNamedReflector(naming.GetNameFromCallsite(internalPackages...),lw,expectedType,store,resyncPeriod)}// NewNamedReflector 与 NewReflector 一样,只是指定了一个...
// 将资源对象转换为资源列表,讲runtime.Object 对象转换为[]runtime.Object对象 items, err := meta.ExtractList(list) if err != nil { return fmt.Errorf("unable to understand list result %#v (%v)", list, err) } initTrace.Step("Objects extracted") // 将资源对象列表中的资源和版本号存储...
funcNewReflector(lwListerWatcher,expectedTypeinterface{},storeStore,resyncPeriod time.Duration)*Reflector{ // 默认的反射器名称为 file:line returnNewNamedReflector(naming.GetNameFromCallsite(internalPackages...),lw,expectedType,store,resyncPeriod) } // NewNamedReflector 与 NewReflector 一样,只是指定了...
funcNewReflector(lwListerWatcher,expectedTypeinterface{},storeStore,resyncPeriod time.Duration)*Reflector{ // 默认的反射器名称为 file:line returnNewNamedReflector(naming.GetNameFromCallsite(internalPackages...),lw,expectedType,store,resyncPeriod) ...
// 默认的反射器名称为 file:line return NewNamedReflector(naming.GetNameFromCallsite(internalPackages...), lw, expectedType, store, resyncPeriod) } // NewNamedReflector 与 NewReflector 一样,只是指定了一个 name 用于日志记录 func NewNamedReflector(name string, lw ListerWatcher, expectedType interfa...
= nil { utilruntime.HandleError(fmt.Errorf("%s: unable to add watch event object (%#v) to store: %v", r.name, event.Object, err)) } case watch.Modified: err := r.store.Update(event.Object) if err != nil { utilruntime.HandleError(fmt.Errorf("%s: unable to update watch ...