Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for bytesOrLength (0.11 sec)

  1. internal/grid/trace.go

    	local := strings.TrimPrefix(strings.TrimPrefix(t.Local, httpsScheme), httpScheme)
    	remote := strings.TrimPrefix(strings.TrimPrefix(t.Remote, httpsScheme), httpScheme)
    
    	start := time.Now()
    	body := bytesOrLength(req)
    	resp, err := c.roundtrip(h, req)
    	end := time.Now()
    	status := http.StatusOK
    	errString := ""
    	if err != nil {
    		errString = err.Error()
    		if IsRemoteErr(err) == nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Jun 01 05:17:37 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  2. internal/grid/grid.go

    func WriterToChannel(ctx context.Context, ch chan<- []byte) io.Writer {
    	return &writerWrapper{ch: ch, ctx: ctx}
    }
    
    // bytesOrLength returns small (<=100b) byte slices as string, otherwise length.
    func bytesOrLength(b []byte) string {
    	if len(b) > 100 {
    		return fmt.Sprintf("%d bytes", len(b))
    	}
    	return fmt.Sprint(b)
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 29 18:10:04 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  3. internal/grid/msg.go

    	}
    	if m.Op != 0 {
    		res = append(res, fmt.Sprintf("Op: %v", m.Op))
    	}
    	res = append(res, fmt.Sprintf("Flags: %s", m.Flags.String()))
    	if len(m.Payload) != 0 {
    		res = append(res, fmt.Sprintf("Payload: %v", bytesOrLength(m.Payload)))
    	}
    	return "{" + strings.Join(res, ", ") + "}"
    }
    
    func (f Flags) String() string {
    	var res []string
    	if f&FlagCRCxxh3 != 0 {
    		res = append(res, "CRC")
    	}
    	if f&FlagEOF != 0 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jul 25 21:07:21 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  4. internal/grid/connection.go

    					debug.PrintStack()
    					gridLogIf(ctx, err)
    				}
    			}()
    			b, err = handler(m.Payload)
    			if debugPrint {
    				fmt.Println(c.Local, "Handler returned payload:", bytesOrLength(b), "err:", err)
    			}
    		}()
    
    		if m.DeadlineMS > 0 && time.Since(start).Milliseconds()+c.addDeadline.Milliseconds() > int64(m.DeadlineMS) {
    			if debugReqs {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 29 18:10:04 UTC 2024
    - 46.7K bytes
    - Viewed (0)
Back to top