Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for readyFunc (0.15 sec)

  1. staging/src/k8s.io/apiserver/pkg/admission/handler_test.go

    	handler := newFakeHandler()
    
    	// 1. test no readyFunc
    	if !handler.WaitForReady() {
    		t.Errorf("Expect ready for no readyFunc provided.")
    	}
    
    	// 2. readyFunc return ready immediately
    	readyFunc := func() bool {
    		return true
    	}
    	handler.SetReadyFunc(readyFunc)
    	if !handler.WaitForReady() {
    		t.Errorf("Expect ready for readyFunc returns ready immediately.")
    	}
    
    	// 3. readyFunc always return not ready. WaitForReady timeout
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 08:47:19 UTC 2017
    - 1.4K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/admission/handler.go

    	}
    	return &Handler{
    		operations: operations,
    	}
    }
    
    // SetReadyFunc allows late registration of a ReadyFunc to know if the handler is ready to process requests.
    func (h *Handler) SetReadyFunc(readyFunc ReadyFunc) {
    	h.readyFunc = readyFunc
    }
    
    // WaitForReady will wait for the readyFunc (if registered) to return ready, and in case of timeout, will return false.
    func (h *Handler) WaitForReady() bool {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 08:47:19 UTC 2017
    - 2.2K bytes
    - Viewed (0)
  3. plugin/pkg/admission/network/defaultingressclass/admission.go

    func newPlugin() *classDefaulterPlugin {
    	return &classDefaulterPlugin{
    		Handler: admission.NewHandler(admission.Create),
    	}
    }
    
    // SetExternalKubeInformerFactory sets a lister and readyFunc for this
    // classDefaulterPlugin using the provided SharedInformerFactory.
    func (a *classDefaulterPlugin) SetExternalKubeInformerFactory(f informers.SharedInformerFactory) {
    	informer := f.Networking().V1().IngressClasses()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 11 01:48:45 UTC 2022
    - 4.9K bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/testplugin/testdata/host/host.go

    	}
    	if got, want := *seven.(*int), 7; got != want {
    		log.Fatalf("plugin1.Seven=%d, want %d", got, want)
    	}
    
    	readFunc, err := p.Lookup("ReadCommonX")
    	if err != nil {
    		log.Fatalf(`plugin1.Lookup("ReadCommonX") failed: %v`, err)
    	}
    	if got := readFunc.(func() int)(); got != wantX {
    		log.Fatalf("plugin1.ReadCommonX()=%d, want %d", got, wantX)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  5. src/internal/coverage/test/roundtrip_test.go

    					pi, len(efuncs), nf)
    			}
    			var f coverage.FuncDesc
    			for fi := 0; fi < int(nf); fi++ {
    				if err := pd.ReadFunc(uint32(fi), &f); err != nil {
    					t.Fatalf("ReadFunc(%d) pk %d got error %v",
    						fi, pi, err)
    				}
    				res := cmpFuncDesc(efuncs[fi], f)
    				if res != "" {
    					t.Errorf("ReadFunc(%d) pk %d: %s", fi, pi, res)
    				}
    			}
    		}
    		inf.Close()
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 20 21:42:05 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  6. src/internal/coverage/decodemeta/decode.go

    	return d.strtab.Get(d.hdr.ModulePath)
    }
    
    func (d *CoverageMetaDataDecoder) NumFuncs() uint32 {
    	return d.hdr.NumFuncs
    }
    
    // ReadFunc reads the coverage meta-data for the function with index
    // 'findex', filling it into the FuncDesc pointed to by 'f'.
    func (d *CoverageMetaDataDecoder) ReadFunc(fidx uint32, f *coverage.FuncDesc) error {
    	if fidx >= d.hdr.NumFuncs {
    		return fmt.Errorf("illegal function index")
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 11:36:28 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  7. src/go/doc/reader.go

    }
    
    // isPredeclared reports whether n denotes a predeclared type.
    func (r *reader) isPredeclared(n string) bool {
    	return predeclaredTypes[n] && r.types[n] == nil
    }
    
    // readFunc processes a func or method declaration.
    func (r *reader) readFunc(fun *ast.FuncDecl) {
    	// strip function body if requested.
    	if r.mode&PreserveAST == 0 {
    		fun.Body = nil
    	}
    
    	// associate methods with the receiver type, if any
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 27.5K bytes
    - Viewed (0)
  8. src/internal/coverage/cfile/testsupport.go

    		}
    		ts.cf.SetPackage(pd.PackagePath())
    		importpaths[pd.PackagePath()] = struct{}{}
    		var fd coverage.FuncDesc
    		nf := pd.NumFuncs()
    		for fnIdx := uint32(0); fnIdx < nf; fnIdx++ {
    			if err := pd.ReadFunc(fnIdx, &fd); err != nil {
    				return fmt.Errorf("reading meta-data file %s: %v",
    					p.MetaFile, err)
    			}
    			key := pkfunc{pk: pkIdx, fcn: fnIdx}
    			counters, haveCounters := pmm[key]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:57:47 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  9. src/cmd/internal/cov/readcovdata.go

    		if !r.matchpkg(pd.PackagePath()) {
    			return nil
    		}
    	}
    	r.vis.BeginPackage(pd, pkgIdx)
    	nf := pd.NumFuncs()
    	var fd coverage.FuncDesc
    	for fidx := uint32(0); fidx < nf; fidx++ {
    		if err := pd.ReadFunc(fidx, &fd); err != nil {
    			return r.fatal("reading meta-data file %s: %v", mfname, err)
    		}
    		r.vis.VisitFunc(pkgIdx, fidx, &fd)
    	}
    	r.vis.EndPackage(pd, pkgIdx)
    	return nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 8.4K bytes
    - Viewed (0)
Back to top