Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for NewPathRecorderMux (0.2 sec)

  1. staging/src/k8s.io/apiserver/pkg/server/mux/pathrecorder_test.go

    limitations under the License.
    */
    
    package mux
    
    import (
    	"net/http"
    	"net/http/httptest"
    	"testing"
    
    	"github.com/stretchr/testify/assert"
    )
    
    func TestSecretHandlers(t *testing.T) {
    	c := NewPathRecorderMux("test")
    	c.UnlistedHandleFunc("/secret", func(http.ResponseWriter, *http.Request) {})
    	c.HandleFunc("/nonswagger", func(http.ResponseWriter, *http.Request) {})
    	assert.NotContains(t, c.ListedPaths(), "/secret")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 26 16:15:13 UTC 2017
    - 4.4K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/server/mux/pathrecorder.go

    type prefixHandler struct {
    	// prefix is the prefix to test for a request match
    	prefix string
    	// handler is used to satisfy matching requests
    	handler http.Handler
    }
    
    // NewPathRecorderMux creates a new PathRecorderMux
    func NewPathRecorderMux(name string) *PathRecorderMux {
    	ret := &PathRecorderMux{
    		name:            name,
    		pathToHandler:   map[string]http.Handler{},
    		prefixToHandler: map[string]http.Handler{},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 12 01:52:15 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/server/handler.go

    func NewAPIServerHandler(name string, s runtime.NegotiatedSerializer, handlerChainBuilder HandlerChainBuilderFn, notFoundHandler http.Handler) *APIServerHandler {
    	nonGoRestfulMux := mux.NewPathRecorderMux(name)
    	if notFoundHandler != nil {
    		nonGoRestfulMux.NotFoundHandler(notFoundHandler)
    	}
    
    	gorestfulContainer := restful.NewContainer()
    	gorestfulContainer.ServeMux = http.NewServeMux()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jan 14 17:10:00 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  4. cmd/kube-scheduler/app/server.go

    	pathRecorderMux := mux.NewPathRecorderMux("kube-scheduler")
    	healthz.InstallHandler(pathRecorderMux, healthzChecks...)
    	healthz.InstallLivezHandler(pathRecorderMux)
    	healthz.InstallReadyzHandler(pathRecorderMux, readyzChecks...)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 19:11:24 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  5. cmd/kube-proxy/app/server.go

    }
    
    func serveMetrics(bindAddress string, proxyMode kubeproxyconfig.ProxyMode, enableProfiling bool, errCh chan error) {
    	if len(bindAddress) == 0 {
    		return
    	}
    
    	proxyMux := mux.NewPathRecorderMux("kube-proxy")
    	healthz.InstallHandler(proxyMux)
    	slis.SLIMetricsWithReset{}.Install(proxyMux)
    
    	proxyMux.HandleFunc("/proxyMode", func(w http.ResponseWriter, r *http.Request) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 26 13:27:41 UTC 2024
    - 46.8K bytes
    - Viewed (0)
Back to top