Documentation
¶
Overview ¶
Package capture streams HTTP bodies into the store as they pass through, without buffering them in memory.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capturer ¶
type Capturer struct {
// contains filtered or unexported fields
}
Capturer creates body-capturing tees backed by a Store.
func (*Capturer) TeeBody ¶
func (c *Capturer) TeeBody(src io.Reader) (r io.Reader, finalize func() (string, int64, error), err error)
TeeBody wraps src so that every byte read from the returned reader is also written to the store. Call finalize after the reader is fully consumed to commit the body and obtain its hash and length. If src is nil, the returned reader is empty and finalize reports an empty body.
Click to show internal directories.
Click to hide internal directories.