Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for handleStats (0.28 sec)

  1. pilot/cmd/pilot-agent/status/server_test.go

    				http:           &http.Client{},
    				registry:       TestingRegistry(t),
    			}
    			req := &http.Request{}
    			server.handleStats(rec, req)
    			if rec.Code != 200 {
    				t.Fatalf("handleStats() => %v; want 200", rec.Code)
    			}
    			if !strings.Contains(rec.Body.String(), tt.output) {
    				t.Fatalf("handleStats() => %v; want %v", rec.Body.String(), tt.output)
    			}
    
    			parser := expfmt.TextParser{}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  2. pilot/cmd/pilot-agent/status/server.go

    	// Add the handler for ready probes.
    	mux.HandleFunc(readyPath, s.handleReadyProbe)
    	// Default path for prom
    	mux.HandleFunc(`/metrics`, s.handleStats)
    	// Envoy uses something else - and original agent used the same.
    	// Keep for backward compat with configs.
    	mux.HandleFunc(`/stats/prometheus`, s.handleStats)
    	mux.HandleFunc(quitPath, s.handleQuit)
    	mux.HandleFunc(drainPath, s.handleDrain)
    	mux.HandleFunc("/app-health/", s.handleAppProbe)
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 31.1K bytes
    - Viewed (0)
  3. src/log/slog/handler.go

    	s := handleState{
    		h:       h,
    		buf:     buf,
    		freeBuf: freeBuf,
    		sep:     sep,
    		prefix:  buffer.New(),
    	}
    	if h.opts.ReplaceAttr != nil {
    		s.groups = groupPool.Get().(*[]string)
    		*s.groups = append(*s.groups, h.groups[:h.nOpenGroups]...)
    	}
    	return s
    }
    
    func (s *handleState) free() {
    	if s.freeBuf {
    		s.buf.Free()
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 18:18:13 UTC 2023
    - 17.5K bytes
    - Viewed (0)
  4. src/log/slog/json_handler.go

    func (h *JSONHandler) Handle(_ context.Context, r Record) error {
    	return h.commonHandler.handle(r)
    }
    
    // Adapted from time.Time.MarshalJSON to avoid allocation.
    func appendJSONTime(s *handleState, t time.Time) {
    	if y := t.Year(); y < 0 || y >= 10000 {
    		// RFC 3339 is clear that years are 4 digits exactly.
    		// See golang.org/issue/4556#c15 for more discussion.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 16:18:11 UTC 2023
    - 8.1K bytes
    - Viewed (0)
  5. src/log/slog/text_handler.go

    //
    // Each call to Handle results in a single serialized call to
    // io.Writer.Write.
    func (h *TextHandler) Handle(_ context.Context, r Record) error {
    	return h.commonHandler.handle(r)
    }
    
    func appendTextValue(s *handleState, v Value) error {
    	switch v.Kind() {
    	case KindString:
    		s.appendString(v.str())
    	case KindTime:
    		s.appendTime(v.time())
    	case KindAny:
    		if tm, ok := v.any.(encoding.TextMarshaler); ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 23 22:56:07 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  6. src/log/slog/json_handler_test.go

    		if got != test.want {
    			t.Errorf("%v: got %s, want %s", test.value, got, test.want)
    		}
    	}
    }
    
    func jsonValueString(v Value) string {
    	var buf []byte
    	s := &handleState{h: &commonHandler{json: true}, buf: (*buffer.Buffer)(&buf)}
    	if err := appendJSONValue(s, v); err != nil {
    		s.appendError(err)
    	}
    	return string(buf)
    }
    
    func BenchmarkJSONHandler(b *testing.B) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 11 17:06:26 UTC 2023
    - 6.5K bytes
    - Viewed (0)
Back to top