Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for AddWarning (0.16 sec)

  1. staging/src/k8s.io/apiserver/pkg/endpoints/filters/warning_test.go

    	// add items longer than the individual length
    	warningRecorder.AddWarning("", "aaaaaaaaaa")  // long item
    	warningRecorder.AddWarning("-", "aaaaaaaaaa") // duplicate item
    	warningRecorder.AddWarning("", "bb")          // short item
    	warningRecorder.AddWarning("", "ccc")         // short item
    	warningRecorder.AddWarning("", "Iñtërnâtiô")  // long item
    	// check they are preserved
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 01 16:14:06 UTC 2020
    - 4K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/warning/context.go

    )
    
    // Recorder provides a method for recording warnings
    type Recorder interface {
    	// AddWarning adds the specified warning to the response.
    	// agent must be valid UTF-8, and must not contain spaces, quotes, backslashes, or control characters.
    	// text must be valid UTF-8, and must not contain control characters.
    	AddWarning(agent, text string)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 24 16:37:53 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/endpoints/filters/warning.go

    	truncateItemRunes    = 256
    )
    
    type recordedWarning struct {
    	agent string
    	text  string
    }
    
    type recorder struct {
    	// lock guards calls to AddWarning from multiple threads
    	lock sync.Mutex
    
    	// recorded tracks whether AddWarning was already called with a given text
    	recorded map[string]bool
    
    	// ordered tracks warnings added so they can be replayed and truncated if needed
    	ordered []recordedWarning
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 01 16:14:06 UTC 2020
    - 3.6K bytes
    - Viewed (0)
  4. platforms/jvm/language-java/src/integTest/groovy/org/gradle/api/tasks/compile/JavaCompileProblemsIntegrationTest.groovy

            generator.addWarning()
            generator.addWarning()
            return generator.save()
        }
    
        TestFile writeJavaCausingTwoCompilationErrorsAndTwoWarnings(String className) {
            def generator = new ProblematicClassGenerator(className)
            generator.addError()
            generator.addError()
            generator.addWarning()
            generator.addWarning()
            return generator.save()
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Jun 06 16:15:29 UTC 2024
    - 24K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/endpoints/warning/warning.go

    	if len(warnings) == 0 {
    		return handler
    	}
    
    	return func(req *restful.Request, res *restful.Response) {
    		ctx := req.Request.Context()
    		for _, msg := range warnings {
    			warning.AddWarning(ctx, "", msg)
    		}
    		handler(req, res)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 09 18:11:41 UTC 2022
    - 1.1K bytes
    - Viewed (0)
  6. pkg/registry/batch/job/storage/storage.go

    		job.Strategy.DefaultGarbageCollectionPolicy(ctx) == rest.OrphanDependents {
    		// Throw a warning if delete options are not explicitly set as Job deletion strategy by default is orphaning
    		// pods in v1.
    		warning.AddWarning(ctx, "", deleteOptionWarnings)
    	}
    	return r.Store.Delete(ctx, name, deleteValidation, options)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 18 09:21:19 UTC 2022
    - 6.1K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/authentication/request/bearertoken/bearertoken.go

    		return nil, false, nil
    	}
    
    	token := parts[1]
    
    	// Empty bearer tokens aren't valid
    	if len(token) == 0 {
    		// The space before the token case
    		if len(parts) == 3 {
    			warning.AddWarning(req.Context(), "", invalidTokenWithSpaceWarning)
    		}
    		return nil, false, nil
    	}
    
    	resp, ok, err := a.auth.AuthenticateToken(req.Context(), token)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 25 13:22:28 UTC 2022
    - 2K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator.go

    }
    
    // simple recorder that only appends warning
    type recorder struct {
    	mu       sync.Mutex
    	warnings []*cacheWarning
    }
    
    // AddWarning adds a warning to recorder.
    func (r *recorder) AddWarning(agent, text string) {
    	r.mu.Lock()
    	defer r.mu.Unlock()
    	r.warnings = append(r.warnings, &cacheWarning{agent: agent, text: text})
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/admission.go

    	}
    	managedFieldsAfterAdmission := objectMeta.GetManagedFields()
    	if err := managedfields.ValidateManagedFields(managedFieldsAfterAdmission); err != nil {
    		objectMeta.SetManagedFields(managedFieldsBeforeAdmission)
    		warning.AddWarning(ctx, "",
    			fmt.Sprintf(InvalidManagedFieldsAfterMutatingAdmissionWarningFormat,
    				err.Error()),
    		)
    	}
    	return nil
    }
    
    // Validate calls the wrapped admission.Interface if aplicable
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 21:44:00 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/server/genericapiserver_test.go

    				break loop
    			default:
    				warning.AddWarning(r.Context(), "a", "1")
    			}
    		}
    		// the request has just timed out, write to catch read/write races
    		warning.AddWarning(r.Context(), "agent", "text")
    
    		// give time for the timeout response to be written, then try to
    		// write a response header to catch the "Header after Handler finished" panic
    		<-clientDoneCh
    
    		warning.AddWarning(r.Context(), "agent", "text")
    	})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 18:59:21 UTC 2024
    - 23.2K bytes
    - Viewed (0)
Back to top