MCPcopy
hub / github.com/grafana/dskit / Size

Method Size

httpgrpc/httpgrpc.pb.go:659–679  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

657}
658
659func (m *HTTPResponse) Size() (n int) {
660 if m == nil {
661 return 0
662 }
663 var l int
664 _ = l
665 if m.Code != 0 {
666 n += 1 + sovHttpgrpc(uint64(m.Code))
667 }
668 if len(m.Headers) > 0 {
669 for _, e := range m.Headers {
670 l = e.Size()
671 n += 1 + l + sovHttpgrpc(uint64(l))
672 }
673 }
674 l = len(m.Body)
675 if l > 0 {
676 n += 1 + l + sovHttpgrpc(uint64(l))
677 }
678 return n
679}
680
681func (m *Header) Size() (n int) {
682 if m == nil {

Callers 3

XXX_SizeMethod · 0.95
MarshalMethod · 0.95
MarshalToMethod · 0.95

Calls 2

sovHttpgrpcFunction · 0.85
SizeMethod · 0.65

Tested by

no test coverage detected