Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 179 for Handle (1.54 sec)

  1. internal/grid/grid_test.go

    	}
    
    	// We fake a local and remote server.
    	remoteHost := remote.HostName()
    	handler := NewStream[*testRequest, *testRequest, *testResponse](handlerTest, newTestRequest, newTestRequest, newTestResponse)
    	handler.InCapacity = 1
    	handler.OutCapacity = 1
    	const payloads = 10
    
    	// 1: Echo
    	register := func(manager *Manager) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 30 15:03:35 GMT 2024
    - 30.1K bytes
    - Viewed (0)
  2. cni/pkg/monitoring/monitoring.go

    		return
    	}
    	exporter, err := monitoring.RegisterPrometheusExporter(nil, nil)
    	if err != nil {
    		log.Errorf("could not set up prometheus exporter: %v", err)
    		return
    	}
    	mux.Handle(path, exporter)
    	monitoringServer := &http.Server{
    		Handler: mux,
    	}
    	go func() {
    		if err = monitoringServer.Serve(listener); network.IsUnexpectedListenerError(err) {
    			log.Errorf("error running monitoring http server: %s", err)
    		}
    	}()
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Jun 09 07:54:01 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  3. internal/lock/lock_windows.go

    func lockedOpenFile(path string, flag int, perm os.FileMode, lockType uint32) (*LockedFile, error) {
    	f, err := Open(path, flag, perm)
    	if err != nil {
    		return nil, err
    	}
    
    	if err = lockFile(syscall.Handle(f.Fd()), lockType); err != nil {
    		f.Close()
    		return nil, err
    	}
    
    	st, err := os.Stat(path)
    	if err != nil {
    		f.Close()
    		return nil, err
    	}
    
    	if st.IsDir() {
    		f.Close()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Oct 18 18:08:15 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  4. cmd/signature-v4-utils.go

    	if confRegion == "" {
    		return true
    	}
    	if confRegion == "US" {
    		confRegion = globalMinioDefaultRegion
    	}
    	// Some older s3 clients set region as "US" instead of
    	// globalMinioDefaultRegion, handle it.
    	if reqRegion == "US" {
    		reqRegion = globalMinioDefaultRegion
    	}
    	return reqRegion == confRegion
    }
    
    // check if the access key is valid and recognized, additionally
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Jan 31 18:56:45 GMT 2024
    - 9K bytes
    - Viewed (0)
  5. internal/config/policy/opa/config.go

    	opaRespBytes, err := io.ReadAll(resp.Body)
    	if err != nil {
    		return false, err
    	}
    
    	// Handle large OPA responses when OPA URL is of
    	// form http://localhost:8181/v1/data/httpapi/authz
    	type opaResultAllow struct {
    		Result struct {
    			Allow bool `json:"allow"`
    		} `json:"result"`
    	}
    
    	// Handle simpler OPA responses when OPA URL is of
    	// form http://localhost:8181/v1/data/httpapi/authz/allow
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Sep 14 21:50:16 GMT 2023
    - 5.2K bytes
    - Viewed (1)
  6. cni/pkg/nodeagent/cni-watcher.go

    		http.Error(w, err.Error(), http.StatusBadRequest)
    		return
    	}
    
    	if err := s.ReconcileCNIAddEvent(req.Context(), msg); err != nil {
    		log.Errorf("Failed to handle add event: %v", err)
    		http.Error(w, err.Error(), http.StatusInternalServerError)
    		return
    	}
    }
    
    func processAddEvent(body []byte) (CNIPluginAddEvent, error) {
    	var msg CNIPluginAddEvent
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Feb 08 18:52:24 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  7. internal/http/server.go

    			return
    		}
    
    		atomic.AddInt32(&srv.requestCount, 1)
    		defer atomic.AddInt32(&srv.requestCount, -1)
    
    		// Handle request using passed handler.
    		handler.ServeHTTP(w, r)
    	})
    
    	srv.listenerMutex.Lock()
    	srv.Handler = wrappedHandler
    	srv.listener = listener
    	srv.listenerMutex.Unlock()
    
    	var l net.Listener = listener
    	if tlsConfig != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 09 21:25:16 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  8. internal/grid/benchmark_test.go

    	errFatal(err)
    	b.Cleanup(grid.Cleanup)
    	const responses = 10
    	// Create n managers.
    	for _, remote := range grid.Managers {
    		// Register a single handler which echos the payload.
    		errFatal(remote.RegisterStreamingHandler(handlerTest, StreamHandler{
    			// Send 10x response.
    			Handle: func(ctx context.Context, payload []byte, _ <-chan []byte, out chan<- []byte) *RemoteErr {
    				for i := 0; i < responses; i++ {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 12.2K bytes
    - Viewed (0)
  9. cmd/storage-errors.go

    	}
    	if isSysErrIO(err) {
    		return errFaultyDisk
    	}
    	if isSysErrInvalidArg(err) {
    		storageLogIf(context.Background(), err)
    		// For some odd calls with O_DIRECT reads
    		// filesystems can return EINVAL, handle
    		// these as FileNotFound instead.
    		return errFileNotFound
    	}
    	if isSysErrNoSpace(err) {
    		return errDiskFull
    	}
    	return err
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  10. internal/grid/manager.go

    func (m *Manager) AddToMux(router *mux.Router) {
    	router.Handle(RoutePath, m.Handler())
    }
    
    // Handler returns a handler that can be used to serve grid requests.
    // This should be connected on RoutePath to the main server.
    func (m *Manager) Handler() http.HandlerFunc {
    	return func(w http.ResponseWriter, req *http.Request) {
    		defer func() {
    			if debugPrint {
    				fmt.Printf("grid: Handler returning from: %v %v\n", req.Method, req.URL)
    			}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 9.5K bytes
    - Viewed (0)
Back to top