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

Method Size

httpgrpc/httpgrpc.pb.go:632–657  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

630 return base
631}
632func (m *HTTPRequest) Size() (n int) {
633 if m == nil {
634 return 0
635 }
636 var l int
637 _ = l
638 l = len(m.Method)
639 if l > 0 {
640 n += 1 + l + sovHttpgrpc(uint64(l))
641 }
642 l = len(m.Url)
643 if l > 0 {
644 n += 1 + l + sovHttpgrpc(uint64(l))
645 }
646 if len(m.Headers) > 0 {
647 for _, e := range m.Headers {
648 l = e.Size()
649 n += 1 + l + sovHttpgrpc(uint64(l))
650 }
651 }
652 l = len(m.Body)
653 if l > 0 {
654 n += 1 + l + sovHttpgrpc(uint64(l))
655 }
656 return n
657}
658
659func (m *HTTPResponse) Size() (n int) {
660 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