Documentation
¶
Index ¶
- func GetPathBuilder() *fastpath.Builder
- func NopReadCloser(r io.Reader) io.ReadCloser
- func NopWriteCloser(w io.Writer) io.WriteCloser
- func PutPathBuilder(pb *fastpath.Builder)
- func ReadCloserWithCallback(rc io.ReadCloser, cb func()) io.ReadCloser
- func WriteCloserWithCallback(wc io.WriteCloser, cb func()) io.WriteCloser
- type ByteReaderSize
- type ReaderSize
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPathBuilder ¶
func GetPathBuilder() *fastpath.Builder
GetPathBuilder fetches a fastpath.Builder object from the pool.
func NopReadCloser ¶
func NopReadCloser(r io.Reader) io.ReadCloser
NopReadCloser turns a supplied io.Reader into io.ReadCloser with a nop Close() implementation.
func NopWriteCloser ¶
func NopWriteCloser(w io.Writer) io.WriteCloser
NopWriteCloser turns a supplied io.Writer into io.WriteCloser with a nop Close() implementation.
func PutPathBuilder ¶
func PutPathBuilder(pb *fastpath.Builder)
PutPathBuilder places supplied fastpath.Builder back in the pool.
func ReadCloserWithCallback ¶
func ReadCloserWithCallback(rc io.ReadCloser, cb func()) io.ReadCloser
ReadCloserWithCallback adds a customizable callback to be called upon Close() of a supplied io.ReadCloser. Note that the callback will never be called more than once, after execution this will remove the func reference.
func WriteCloserWithCallback ¶
func WriteCloserWithCallback(wc io.WriteCloser, cb func()) io.WriteCloser
WriteCloserWithCallback adds a customizable callback to be called upon Close() of a supplied io.WriteCloser. Note that the callback will never be called more than once, after execution this will remove the func reference.
Types ¶
type ByteReaderSize ¶
ByteReaderSize ...
func (*ByteReaderSize) Reset ¶
func (rs *ByteReaderSize) Reset(b []byte)
Reset resets the ReaderSize to be reading from b.
func (ByteReaderSize) Size ¶
func (rs ByteReaderSize) Size() int64
Size implements ReaderSize.Size().